Browse Source

fw_att_control: Fix stuttering rudder in manual mode (#9607)

fw_att_control: Fix bug that caused the rudder to stutter when FW_RLL_TO_YAW_FF>0 and aileron input was supplied
sbg
Philipp Oettershagen 7 years ago committed by Lorenz Meier
parent
commit
ba2cf5fa9a
  1. 8
      src/modules/fw_att_control/FixedwingAttitudeControl.cpp

8
src/modules/fw_att_control/FixedwingAttitudeControl.cpp

@ -261,14 +261,10 @@ FixedwingAttitudeControl::vehicle_control_mode_poll()
void void
FixedwingAttitudeControl::vehicle_manual_poll() FixedwingAttitudeControl::vehicle_manual_poll()
{ {
bool manual_updated;
/* get pilots inputs */
orb_check(_manual_sub, &manual_updated);
// only update manual if in a manual mode // only update manual if in a manual mode
if (_vcontrol_mode.flag_control_manual_enabled && manual_updated) { if (_vcontrol_mode.flag_control_manual_enabled) {
// Always copy the new manual setpoint, even if it wasn't updated, to fill the _actuators with valid values
if (orb_copy(ORB_ID(manual_control_setpoint), _manual_sub, &_manual) == PX4_OK) { if (orb_copy(ORB_ID(manual_control_setpoint), _manual_sub, &_manual) == PX4_OK) {
// Check if we are in rattitude mode and the pilot is above the threshold on pitch // Check if we are in rattitude mode and the pilot is above the threshold on pitch

Loading…
Cancel
Save