mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 05:50:36 +08:00
fix commander: handle mode executor correctly on disarm
There were a number of cases where the state was not correct or not as desired after disarming, when running an external mode 'MyMission' with executor: - run MyMission, which triggers Hold, then Land - before: Mode: Hold, executor_in_charge: 1 - after: Mode: MyMission, executor_in_charge: 1 - run MyMission, then user switches to RTL - before: Mode: MyMission, executor_in_charge: 0 - after: Mode: MyMission, executor_in_charge: 1 - run MyMission, then while in Hold mode, low battery failsafe (RTL) - before: Mode: Hold, executor_in_charge: 1 - after: Mode: MyMission, executor_in_charge: 1 - run MyMission, then stop external mode (terminate the process) - before: Mode: (mode not available), executor_in_charge: 0 - after: Mode: Hold, executor_in_charge: 0 This case is unchanged: - run MyMission, then low battery failsafe (RTL) - before: Mode: MyMission, executor_in_charge: 1 - after: Mode: MyMission, executor_in_charge: 1
This commit is contained in:
@@ -53,6 +53,8 @@ public:
|
||||
* @return nav_state or the mode that nav_state replaces
|
||||
*/
|
||||
virtual uint8_t getReplacedModeIfAny(uint8_t nav_state) = 0;
|
||||
|
||||
virtual uint8_t onDisarm(uint8_t stored_nav_state) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user