Sub: allow scripts to get modes

This commit is contained in:
Tatsuya Yamaguchi 2020-01-09 23:48:30 +09:00 committed by Andrew Tridgell
parent 1f9f84044c
commit 1c07609f47

View File

@ -540,6 +540,7 @@ private:
void fence_check(); void fence_check();
bool set_mode(control_mode_t mode, ModeReason reason); bool set_mode(control_mode_t mode, ModeReason reason);
bool set_mode(const uint8_t mode, const ModeReason reason) override; bool set_mode(const uint8_t mode, const ModeReason reason) override;
uint8_t get_mode() const override { return (uint8_t)control_mode; }
void update_flight_mode(); void update_flight_mode();
void exit_mode(control_mode_t old_control_mode, control_mode_t new_control_mode); void exit_mode(control_mode_t old_control_mode, control_mode_t new_control_mode);
bool mode_requires_GPS(control_mode_t mode); bool mode_requires_GPS(control_mode_t mode);