AP_Tuning: ignore tuning selector switch unless valid RC input

This commit is contained in:
Peter Barker 2019-06-21 14:15:33 +10:00 committed by Tom Pittenger
parent 288b13868b
commit afd63c05ec
1 changed files with 4 additions and 0 deletions

View File

@ -65,6 +65,10 @@ void AP_Tuning::check_selector_switch(void)
// no selector switch enabled // no selector switch enabled
return; return;
} }
if (!rc().has_valid_input()) {
selector_start_ms = 0;
return;
}
RC_Channel *selchan = rc().channel(selector-1); RC_Channel *selchan = rc().channel(selector-1);
if (selchan == nullptr) { if (selchan == nullptr) {
return; return;