egzumer / uv-k5-firmware-custom

A merge between https://github.com/OneOfEleven/uv-k5-firmware-custom and https://github.com/fagci/uv-k5-firmware-fagci-mod
Apache License 2.0
1.23k stars 396 forks source link

Add ifdef preprocessor directives if ENABLE_DTMF_CALLING is disable #444

Closed armel closed 8 months ago

armel commented 8 months ago

If ENABLE_DTMF_CALLING is disable in the Makefile, compilation failed.

app/menu.c: In function 'MENU_Key_MENU':
app/menu.c:1407:43: error: 'MENU_ANI_ID' undeclared (first use in this function); did you mean 'MENU_PTT_ID'?
 1407 |         if (UI_MENU_GetCurrentMenuId() == MENU_ANI_ID || UI_MENU_GetCurrentMenuId() == MENU_UPCODE|| UI_MENU_GetCurrentMenuId() == MENU_DWCODE)
      |                                           ^~~~~~~~~~~
      |                                           MENU_PTT_ID
app/menu.c:1407:43: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:446: app/menu.o] Error 1

So I propose to add ifdef preprocessor directives. Thank you for your work and 73' de F4HWN.