From 7430a415fb9ccde69f74dbd3509615dd4b125896 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Wed, 3 Feb 2021 18:21:39 +0100 Subject: [PATCH] AP_Tuning: use AUX_PWM_TRIGGER_LOW and AUX_PWM_TRIGGER_HIGH --- libraries/AP_Tuning/AP_Tuning.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Tuning/AP_Tuning.cpp b/libraries/AP_Tuning/AP_Tuning.cpp index 05c4273b51..4fec4b55f8 100644 --- a/libraries/AP_Tuning/AP_Tuning.cpp +++ b/libraries/AP_Tuning/AP_Tuning.cpp @@ -75,7 +75,7 @@ void AP_Tuning::check_selector_switch(void) return; } uint16_t selector_in = selchan->get_radio_in(); - if (selector_in >= 1700) { + if (selector_in >= RC_Channel::AUX_PWM_TRIGGER_HIGH) { // high selector if (selector_start_ms == 0) { selector_start_ms = AP_HAL::millis(); @@ -90,7 +90,7 @@ void AP_Tuning::check_selector_switch(void) changed = false; need_revert = 0; } - } else if (selector_in <= 1300) { + } else if (selector_in <= RC_Channel::AUX_PWM_TRIGGER_LOW) { // low selector if (selector_start_ms != 0) { uint32_t hold_time = AP_HAL::millis() - selector_start_ms;