Plane: allow scripts to get modes

This commit is contained in:
Tatsuya Yamaguchi 2020-01-09 23:48:03 +09:00 committed by Andrew Tridgell
parent e01e924711
commit 1f9f84044c
1 changed files with 1 additions and 0 deletions

View File

@ -901,6 +901,7 @@ private:
bool set_mode(Mode& new_mode, const ModeReason reason); bool set_mode(Mode& new_mode, const ModeReason reason);
bool set_mode(const uint8_t mode, const ModeReason reason) override; bool set_mode(const uint8_t mode, const ModeReason reason) override;
bool set_mode_by_number(const Mode::Number new_mode_number, const ModeReason reason); bool set_mode_by_number(const Mode::Number new_mode_number, const ModeReason reason);
uint8_t get_mode() const override { return (uint8_t)control_mode->mode_number(); }
Mode *mode_from_mode_num(const enum Mode::Number num); Mode *mode_from_mode_num(const enum Mode::Number num);
void check_long_failsafe(); void check_long_failsafe();
void check_short_failsafe(); void check_short_failsafe();