From 1c07609f47e572ddbc156650c60af73a8aac58e4 Mon Sep 17 00:00:00 2001 From: Tatsuya Yamaguchi Date: Thu, 9 Jan 2020 23:48:30 +0900 Subject: [PATCH] Sub: allow scripts to get modes --- ArduSub/Sub.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index 19df7b5db9..103e4ece46 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -540,6 +540,7 @@ private: void fence_check(); bool set_mode(control_mode_t mode, ModeReason reason); 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 exit_mode(control_mode_t old_control_mode, control_mode_t new_control_mode); bool mode_requires_GPS(control_mode_t mode);