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

View File

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