forked from Archive/PX4-Autopilot
vtol_att_control: standard: also do blending for FW controls
So that the sum of the control is always 1.
This commit is contained in:
parent
6db92b4011
commit
04b1cbb423
|
@ -369,9 +369,9 @@ void Standard::fill_actuator_outputs()
|
||||||
mc_out[actuator_controls_s::INDEX_LANDING_GEAR] = landing_gear_s::GEAR_UP;
|
mc_out[actuator_controls_s::INDEX_LANDING_GEAR] = landing_gear_s::GEAR_UP;
|
||||||
|
|
||||||
// FW out = FW in, with VTOL transition controlling throttle and airbrakes
|
// FW out = FW in, with VTOL transition controlling throttle and airbrakes
|
||||||
fw_out[actuator_controls_s::INDEX_ROLL] = fw_in[actuator_controls_s::INDEX_ROLL];
|
fw_out[actuator_controls_s::INDEX_ROLL] = fw_in[actuator_controls_s::INDEX_ROLL] * (1.f - _mc_roll_weight);
|
||||||
fw_out[actuator_controls_s::INDEX_PITCH] = fw_in[actuator_controls_s::INDEX_PITCH];
|
fw_out[actuator_controls_s::INDEX_PITCH] = fw_in[actuator_controls_s::INDEX_PITCH] * (1.f - _mc_pitch_weight);
|
||||||
fw_out[actuator_controls_s::INDEX_YAW] = fw_in[actuator_controls_s::INDEX_YAW];
|
fw_out[actuator_controls_s::INDEX_YAW] = fw_in[actuator_controls_s::INDEX_YAW] * (1.f - _mc_yaw_weight);
|
||||||
fw_out[actuator_controls_s::INDEX_THROTTLE] = _pusher_throttle;
|
fw_out[actuator_controls_s::INDEX_THROTTLE] = _pusher_throttle;
|
||||||
fw_out[actuator_controls_s::INDEX_FLAPS] = _flaps_setpoint_with_slewrate.getState();
|
fw_out[actuator_controls_s::INDEX_FLAPS] = _flaps_setpoint_with_slewrate.getState();
|
||||||
fw_out[actuator_controls_s::INDEX_SPOILERS] = _spoiler_setpoint_with_slewrate.getState();
|
fw_out[actuator_controls_s::INDEX_SPOILERS] = _spoiler_setpoint_with_slewrate.getState();
|
||||||
|
|
Loading…
Reference in New Issue