AP_OSD: correct compilation when RC_Channels library not available

This commit is contained in:
Peter Barker 2023-12-08 13:12:45 +11:00 committed by Peter Barker
parent 2768c63971
commit 1aa6ad5bc3
1 changed files with 2 additions and 0 deletions

View File

@ -511,6 +511,7 @@ void AP_OSD::update_current_screen()
return;
}
#if AP_RC_CHANNEL_ENABLED
RC_Channel *channel = RC_Channels::rc_channel(rc_channel-1);
if (channel == nullptr) {
return;
@ -566,6 +567,7 @@ void AP_OSD::update_current_screen()
break;
}
switch_debouncer = false;
#endif // AP_RC_CHANNEL_ENABLED
}
//select next avaliable screen, do nothing if all screens disabled