AP_Tuning: use AUX_PWM_TRIGGER_LOW and AUX_PWM_TRIGGER_HIGH

This commit is contained in:
Pierre Kancir 2021-02-03 18:21:39 +01:00 committed by Andrew Tridgell
parent 67bdec3325
commit 7430a415fb
1 changed files with 2 additions and 2 deletions

View File

@ -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;