diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 8d7dfaa110..c468656f30 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -95,9 +95,11 @@ RC_Channel::set_angle(int16_t angle) } void -RC_Channel::set_dead_zone(int16_t dzone) +RC_Channel::set_default_dead_zone(int16_t dzone) { - _dead_zone.set_and_save(abs(dzone >>1)); + if (!_dead_zone.load()) { + _dead_zone.set(abs(dzone)); + } } void diff --git a/libraries/RC_Channel/RC_Channel.h b/libraries/RC_Channel/RC_Channel.h index 21cdff84cd..e3eedf4d11 100644 --- a/libraries/RC_Channel/RC_Channel.h +++ b/libraries/RC_Channel/RC_Channel.h @@ -49,7 +49,7 @@ public: void set_angle(int16_t angle); void set_reverse(bool reverse); bool get_reverse(void); - void set_dead_zone(int16_t dzone); + void set_default_dead_zone(int16_t dzone); // read input from APM_RC - create a control_in value void set_pwm(int16_t pwm);