From 94bf455a575cdada058ac8d7ccf7aa3d4becfee5 Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Thu, 6 Feb 2025 03:26:09 +0100 Subject: [PATCH] Save 8 bytes --- functions.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/functions.c b/functions.c index 35709d7..d09abbd 100644 --- a/functions.c +++ b/functions.c @@ -255,6 +255,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function) UI_DisplayStatus(); } + /* switch (Function) { case FUNCTION_FOREGROUND: FUNCTION_Foreground(PreviousFunction); @@ -278,6 +279,23 @@ void FUNCTION_Select(FUNCTION_Type_t Function) default: break; } + */ + + if (Function == FUNCTION_FOREGROUND) { + FUNCTION_Foreground(PreviousFunction); + return; + } + + if (Function == FUNCTION_POWER_SAVE) { + FUNCTION_PowerSave(); + return; + } + + if (Function == FUNCTION_TRANSMIT) { + FUNCTION_Transmit(); + } else if (Function == FUNCTION_MONITOR) { + gMonitor = true; + } gBatterySaveCountdown_10ms = battery_save_count_10ms; gSchedulePowerSave = false;