1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #pragma once
- #include <AP_Param/AP_Param.h>
- #include <AP_Common/AP_Common.h>
- #include "AC_InputManager.h"
- # define AC_ATTITUDE_HELI_STAB_COLLECTIVE_MIN_DEFAULT 0
- # define AC_ATTITUDE_HELI_STAB_COLLECTIVE_LOW_DEFAULT 400
- # define AC_ATTITUDE_HELI_STAB_COLLECTIVE_HIGH_DEFAULT 600
- # define AC_ATTITUDE_HELI_STAB_COLLECTIVE_MAX_DEFAULT 1000
- class AC_InputManager_Heli : public AC_InputManager {
- public:
-
- AC_InputManager_Heli()
- : AC_InputManager()
- {
-
- AP_Param::setup_object_defaults(this, var_info);
- }
-
- AC_InputManager_Heli(const AC_InputManager_Heli &other) = delete;
- AC_InputManager_Heli &operator=(const AC_InputManager_Heli&) = delete;
-
- float get_pilot_desired_collective(int16_t control_in);
-
- void set_use_stab_col(bool use) { _im_flags_heli.use_stab_col = use; }
-
- void set_stab_col_ramp(float ramp) { _stab_col_ramp = constrain_float(ramp, 0.0, 1.0); }
- static const struct AP_Param::GroupInfo var_info[];
- private:
- struct InputManagerHeliFlags {
- uint8_t use_stab_col : 1;
- } _im_flags_heli;
-
- float _stab_col_ramp = 0;
- AP_Int16 _heli_stab_col_min;
- AP_Int16 _heli_stab_col_low;
- AP_Int16 _heli_stab_col_high;
- AP_Int16 _heli_stab_col_max;
- AP_Float _acro_col_expo;
- };
|