FlightModeManager: handle commands all the time

Moving the command handling to a separate function that gets called
whenever a vehicle command is available to always react on commands
and not just when already a task is running.

This solves e.g. commanding an Orbit when in Staibilized.
This commit is contained in:
Matthias Grob
2021-01-17 15:46:30 +01:00
committed by Lorenz Meier
parent df54f938ef
commit 031bbb7f3e
2 changed files with 49 additions and 45 deletions
@@ -90,6 +90,7 @@ private:
void start_flight_task();
void check_failure(bool task_failure, uint8_t nav_state);
void send_vehicle_cmd_do(uint8_t nav_state);
void handleCommand();
void generateTrajectorySetpoint(const float dt, const vehicle_local_position_s &vehicle_local_position);
void limitAltitude(vehicle_local_position_setpoint_s &setpoint, const vehicle_local_position_s &vehicle_local_position);
void reset_setpoint_to_nan(vehicle_local_position_setpoint_s &setpoint);