Skip to content

Commit

Permalink
Fix compilation errors when FM radio is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JuantAldea committed Dec 14, 2023
1 parent eccce3f commit 45bfd4b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions app/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
}
else // short pressed
{
#ifdef ENABLE_FMRADIO
if (gScreenToDisplay != DISPLAY_FM)
#endif
{
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
return;
Expand Down Expand Up @@ -221,17 +223,24 @@ void GENERIC_Key_PTT(bool bKeyPressed)
// request start TX
gFlagPrepareTX = true;
goto done;

cancel_tx:
if (gPttIsPressed)
{
gPttWasPressed = true;
}

done:
done:
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;
}

gUpdateStatus = true;
gUpdateDisplay = true;
}

0 comments on commit 45bfd4b

Please sign in to comment.