From 82cd9e24c3b3f7f90751ad24c8b52ccaea012764 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 15 Sep 2021 23:31:32 +0100 Subject: [PATCH] RC_Channel: add configured_in_storage metthod --- libraries/RC_Channel/RC_Channel.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/RC_Channel/RC_Channel.h b/libraries/RC_Channel/RC_Channel.h index bacbbd02e8..9fdc7721ea 100644 --- a/libraries/RC_Channel/RC_Channel.h +++ b/libraries/RC_Channel/RC_Channel.h @@ -91,6 +91,9 @@ public: // set and save trim if changed void set_and_save_radio_trim(int16_t val) { radio_trim.set_and_save_ifchanged(val);} + // check if any of the trim/min/max param are configured in storage, this would indicate that the user has done a calibration at somepoint + bool configured_in_storage() { return radio_min.configured_in_storage() || radio_max.configured_in_storage() || radio_trim.configured_in_storage(); } + ChannelType get_type(void) const { return type_in; } AP_Int16 option; // e.g. activate EPM gripper / enable fence