From 8850e4b9a14e3c01bd120a82eade10b47aa8086f Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Wed, 22 Aug 2018 00:18:36 -0700 Subject: [PATCH] SRV_Channel: Remove the trim_all interface, constrain failsafes to non motor outputs --- libraries/SRV_Channel/SRV_Channel.h | 5 +---- libraries/SRV_Channel/SRV_Channels.cpp | 13 ++++--------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/libraries/SRV_Channel/SRV_Channel.h b/libraries/SRV_Channel/SRV_Channel.h index 06242aafb4..a6906972fb 100644 --- a/libraries/SRV_Channel/SRV_Channel.h +++ b/libraries/SRV_Channel/SRV_Channel.h @@ -312,11 +312,8 @@ public: flags.k_throttle_reversible = true; } - // set all outputs to the TRIM value - static void output_trim_all(void); - // setup IO failsafe for all channels to trim - static void setup_failsafe_trim_all(void); + static void setup_failsafe_trim_all_non_motors(void); // set output for all channels matching the given function type, allow radio_trim to center servo static void set_output_pwm_trimmed(SRV_Channel::Aux_servo_function_t function, int16_t value); diff --git a/libraries/SRV_Channel/SRV_Channels.cpp b/libraries/SRV_Channel/SRV_Channels.cpp index f13fc7ed18..a677df5387 100644 --- a/libraries/SRV_Channel/SRV_Channels.cpp +++ b/libraries/SRV_Channel/SRV_Channels.cpp @@ -178,17 +178,12 @@ void SRV_Channels::save_trim(void) trimmed_mask = 0; } -void SRV_Channels::output_trim_all(void) -{ - for (uint8_t i=0; iset_failsafe_pwm(1U<set_failsafe_pwm(1U<