Fix compilation errors when FM radio is disabled

This commit is contained in:
Juan Antonio
2023-12-14 19:30:04 +01:00
committed by egzumer
parent 4b583bf2bd
commit 7f5236c44e

View File

@@ -83,7 +83,9 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
} }
else // short pressed else // short pressed
{ {
#ifdef ENABLE_FMRADIO
if (gScreenToDisplay != DISPLAY_FM) if (gScreenToDisplay != DISPLAY_FM)
#endif
{ {
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL; gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
return; return;
@@ -221,17 +223,24 @@ start_tx:
// request start TX // request start TX
gFlagPrepareTX = true; gFlagPrepareTX = true;
goto done; goto done;
cancel_tx: cancel_tx:
if (gPttIsPressed) if (gPttIsPressed)
{ {
gPttWasPressed = true; gPttWasPressed = true;
} }
done: done:
gPttDebounceCounter = 0; gPttDebounceCounter = 0;
if (gScreenToDisplay != DISPLAY_MENU && gRequestDisplayScreen != DISPLAY_FM) // 1of11 .. don't close the menu if (gScreenToDisplay != DISPLAY_MENU
#ifdef ENABLE_FMRADIO
&& gRequestDisplayScreen != DISPLAY_FM
#endif
) {
// 1of11 .. don't close the menu
gRequestDisplayScreen = DISPLAY_MAIN; gRequestDisplayScreen = DISPLAY_MAIN;
}
gUpdateStatus = true; gUpdateStatus = true;
gUpdateDisplay = true; gUpdateDisplay = true;
} }