control_mode: add allocation to orbit mode to not crash

This commit is contained in:
Matthias Grob 2023-11-23 18:58:38 +01:00
parent a99a7d2abd
commit 6e31638817
1 changed files with 5 additions and 4 deletions

View File

@ -168,12 +168,13 @@ void getVehicleControlMode(uint8_t nav_state, uint8_t vehicle_type,
case vehicle_status_s::NAVIGATION_STATE_ORBIT:
vehicle_control_mode.flag_control_manual_enabled = false;
vehicle_control_mode.flag_control_auto_enabled = false;
vehicle_control_mode.flag_control_rates_enabled = true;
vehicle_control_mode.flag_control_attitude_enabled = true;
vehicle_control_mode.flag_control_altitude_enabled = true;
vehicle_control_mode.flag_control_climb_rate_enabled = true;
vehicle_control_mode.flag_control_position_enabled = true;
vehicle_control_mode.flag_control_velocity_enabled = true;
vehicle_control_mode.flag_control_altitude_enabled = true;
vehicle_control_mode.flag_control_climb_rate_enabled = true;
vehicle_control_mode.flag_control_attitude_enabled = true;
vehicle_control_mode.flag_control_rates_enabled = true;
vehicle_control_mode.flag_control_allocation_enabled = true;
break;
// vehicle_status_s::NAVIGATION_STATE_EXTERNALx: handled in ModeManagement