Browse Source

fw att control: use RC only if in manual

sbg
Thomas Gubler 11 years ago
parent
commit
1a14ff250e
  1. 9
      src/modules/fw_att_control/fw_att_control_main.cpp

9
src/modules/fw_att_control/fw_att_control_main.cpp

@ -717,7 +717,14 @@ FixedwingAttitudeControl::task_main() @@ -717,7 +717,14 @@ FixedwingAttitudeControl::task_main()
float pitch_sp = _parameters.pitchsp_offset_rad;
float throttle_sp = 0.0f;
if (_vcontrol_mode.flag_control_velocity_enabled || _vcontrol_mode.flag_control_position_enabled) {
/* Read attitude setpoint from uorb if
* - velocity control or position control is enabled (pos controller is running)
* - manual control is disabled (another app may send the setpoint, but it should
* for sure not be set from the remote control values)
*/
if (_vcontrol_mode.flag_control_velocity_enabled ||
_vcontrol_mode.flag_control_position_enabled ||
!_vcontrol_mode.flag_control_manual_enabled) {
/* read in attitude setpoint from attitude setpoint uorb topic */
roll_sp = _att_sp.roll_body + _parameters.rollsp_offset_rad;
pitch_sp = _att_sp.pitch_body + _parameters.pitchsp_offset_rad;

Loading…
Cancel
Save