Skip to content

Commit

Permalink
control_mode: add allocation to orbit mode to not crash
Browse files Browse the repository at this point in the history
  • Loading branch information
MaEtUgR committed Nov 23, 2023
1 parent a99a7d2 commit 6e31638
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/modules/commander/ModeUtil/control_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e31638

Please sign in to comment.