From 4f70bdd0460d90de1e485ddd1e81cf5148b1dad5 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 2 Mar 2019 10:25:38 +1100 Subject: [PATCH] Copter: GCS can report simple/supersimple input modes --- ArduCopter/GCS_Copter.cpp | 10 ++++++++++ ArduCopter/GCS_Copter.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/ArduCopter/GCS_Copter.cpp b/ArduCopter/GCS_Copter.cpp index 53a670715b..f1b31aba5f 100644 --- a/ArduCopter/GCS_Copter.cpp +++ b/ArduCopter/GCS_Copter.cpp @@ -7,6 +7,16 @@ const char* GCS_Copter::frame_string() const return copter.get_frame_string(); } +bool GCS_Copter::simple_input_active() const +{ + return copter.ap.simple_mode == 1; +} + +bool GCS_Copter::supersimple_input_active() const +{ + return copter.ap.simple_mode == 2; +} + // update error mask of sensors and subsystems. The mask // uses the MAV_SYS_STATUS_* values from mavlink. If a bit is set // then it indicates that the sensor or subsystem is present but diff --git a/ArduCopter/GCS_Copter.h b/ArduCopter/GCS_Copter.h index 19be2fc8b2..7fc09e1bf9 100644 --- a/ArduCopter/GCS_Copter.h +++ b/ArduCopter/GCS_Copter.h @@ -29,6 +29,9 @@ public: bool vehicle_initialised() const override; + bool simple_input_active() const override; + bool supersimple_input_active() const override; + private: GCS_MAVLINK_Copter _chan[MAVLINK_COMM_NUM_BUFFERS];