Skip to content

Commit

Permalink
Assign NOP function when the flashlight is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JuantAldea authored and egzumer committed Dec 14, 2023
1 parent fa5d3c1 commit 4b583bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/action.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ inline static void ACTION_ScanRestart() { ACTION_Scan(true); };

void (*action_opt_table[])(void) = {
[ACTION_OPT_NONE] = &FUNCTION_NOP,
[ACTION_OPT_FLASHLIGHT] = &ACTION_FlashLight,
[ACTION_OPT_POWER] = &ACTION_Power,
[ACTION_OPT_MONITOR] = &ACTION_Monitor,
[ACTION_OPT_SCAN] = &ACTION_ScanRestart,
Expand All @@ -66,6 +65,12 @@ void (*action_opt_table[])(void) = {
[ACTION_OPT_VFO_MR] = &COMMON_SwitchVFOMode,
[ACTION_OPT_SWITCH_DEMODUL] = &ACTION_SwitchDemodul,

#ifdef ENABLE_FLASHLIGHT
[ACTION_OPT_FLASHLIGHT] = &ACTION_FlashLight,
#else
[ACTION_OPT_FLASHLIGHT] = &FUNCTION_NOP,
#endif

#ifdef ENABLE_VOX
[ACTION_OPT_VOX] = &ACTION_Vox,
#else
Expand Down

0 comments on commit 4b583bf

Please sign in to comment.