48 #include <drivers/drv_pwm_output.h> 52 int32_t vtol_motor_count;
57 float fw_qc_max_pitch;
59 float front_trans_time_openloop;
60 float front_trans_time_min;
61 float front_trans_duration;
62 float back_trans_duration;
63 float transition_airspeed;
64 float front_trans_throttle;
65 float back_trans_throttle;
67 bool airspeed_disabled;
68 float front_trans_timeout;
72 float diff_thrust_scale;
73 int32_t v19_vt_rolldir;
129 virtual void update_vtol_state() = 0;
134 virtual void update_transition_state() = 0;
139 virtual void update_mc_state();
144 virtual void update_fw_state();
149 virtual void fill_actuator_outputs() = 0;
160 void check_quadchute_condition();
165 bool can_transition_on_ground();
169 mode get_mode() {
return _vtol_mode;}
171 virtual void parameters_update() = 0;
177 struct vehicle_attitude_s *_v_att;
178 struct vehicle_attitude_setpoint_s *_v_att_sp;
179 struct vehicle_attitude_setpoint_s *_mc_virtual_att_sp;
180 struct vehicle_attitude_setpoint_s *_fw_virtual_att_sp;
181 struct vehicle_control_mode_s *_v_control_mode;
182 struct vtol_vehicle_status_s *_vtol_vehicle_status;
183 struct actuator_controls_s *_actuators_out_0;
184 struct actuator_controls_s *_actuators_out_1;
185 struct actuator_controls_s *_actuators_mc_in;
186 struct actuator_controls_s *_actuators_fw_in;
187 struct vehicle_local_position_s *_local_pos;
188 struct vehicle_local_position_setpoint_s *_local_pos_sp;
189 struct airspeed_s *_airspeed;
190 struct tecs_status_s *_tecs_status;
191 struct vehicle_land_detected_s *_land_detected;
195 bool flag_idle_mc =
false;
197 bool _pusher_active =
false;
198 float _mc_roll_weight = 1.0f;
199 float _mc_pitch_weight = 1.0f;
200 float _mc_yaw_weight = 1.0f;
201 float _mc_throttle_weight = 1.0f;
204 float _thrust_transition = 0.0f;
206 float _ra_hrate = 0.0f;
207 float _ra_hrate_sp = 0.0f;
209 bool _flag_was_in_trans_mode =
false;
213 bool _tecs_running =
false;
216 motor_state _motor_state = motor_state::DISABLED;
247 motor_state set_motor_state(
const motor_state current_state,
const motor_state next_state,
const int value = 0);
276 bool is_motor_off_channel(
const int channel);
virtual void waiting_on_tecs()
Special handling opportunity for the time right after transition to FW before TECS is running...
Definition: vtol_type.h:155
High-resolution timer with callouts and timekeeping.
Definition: vtol_type.h:50
Definition: vtol_type.h:111
Definition: drv_pwm_output.h:67
pwm_limit_type
Used to specify if min or max pwm values should be altered.
Definition: vtol_type.h:104
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
Definition: drv_hrt.h:58
Common header for mathlib exports.
Definition: vtol_att_control_main.h:89
int32_t fw_motors_off
bitmask of all motors that should be off in fixed wing mode
Definition: vtol_type.h:70