From 4b583bf2bdafa1a0fe3e108494a9f573f5403954 Mon Sep 17 00:00:00 2001 From: Juan Antonio Date: Thu, 14 Dec 2023 19:29:22 +0100 Subject: [PATCH] Assign NOP function when the flashlight is disabled --- app/action.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/action.c b/app/action.c index 9e45aaccf..c05291d74 100644 --- a/app/action.c +++ b/app/action.c @@ -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, @@ -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