Browse Source

VTOL: run vtol state update not only when mc or fw sp are updated, but always

This change is necessary to give the pilot the ability to switch VTOL state
even if for some reason no attitude sp are published anymore.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
sbg
Silvan Fuhrer 5 years ago committed by Roman Bapst
parent
commit
9edb1179d0
  1. 2
      src/modules/vtol_att_control/vtol_att_control_main.cpp

2
src/modules/vtol_att_control/vtol_att_control_main.cpp

@ -365,7 +365,6 @@ VtolAttitudeControl::Run() @@ -365,7 +365,6 @@ VtolAttitudeControl::Run()
bool fw_att_sp_updated = _fw_virtual_att_sp_sub.update(&_fw_virtual_att_sp);
// update the vtol state machine which decides which mode we are in
if (mc_att_sp_updated || fw_att_sp_updated) {
_vtol_type->update_vtol_state();
// reset transition command if not auto control
@ -383,7 +382,6 @@ VtolAttitudeControl::Run() @@ -383,7 +382,6 @@ VtolAttitudeControl::Run()
_transition_command = vtol_vehicle_status_s::VEHICLE_VTOL_STATE_MC;
}
}
}

Loading…
Cancel
Save