RC_Channel: add gcs_is_calibrating bool

This commit is contained in:
Iampete1 2021-08-30 16:54:15 +01:00 committed by Andrew Tridgell
parent f7a788dc44
commit c9107b2e98
1 changed files with 7 additions and 0 deletions

View File

@ -547,6 +547,10 @@ public:
// flight_mode_channel_number must be overridden in vehicle specific code
virtual int8_t flight_mode_channel_number() const = 0;
// set and get calibrating flag, stops arming if true
void calibrating(bool b) { gcs_is_calibrating = b; }
bool calibrating() { return gcs_is_calibrating; }
protected:
enum class Option {
@ -584,6 +588,9 @@ private:
// Allow override by default at start
bool _gcs_overrides_enabled = true;
// true if GCS is performing a RC calibration
bool gcs_is_calibrating;
};
RC_Channels &rc();