diff --git a/Makefile b/Makefile index e3b5714..3b59c09 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ ENABLE_MAIN_KEY_HOLD := 1 ENABLE_BOOT_BEEPS := 0 ENABLE_DTMF_DECODER := 1 ENABLE_COMPANDER := 1 +ENABLE_SHOW_CHARGE_LEVEL := 1 #ENABLE_SINGLE_VFO_CHAN := 1 #ENABLE_BAND_SCOPE := 1 @@ -189,6 +190,9 @@ endif ifeq ($(ENABLE_COMPANDER),1) CFLAGS += -DENABLE_COMPANDER endif +ifeq ($(ENABLE_SHOW_CHARGE_LEVEL),1) + CFLAGS += -DENABLE_SHOW_CHARGE_LEVEL +endif ifeq ($(ENABLE_DTMF_DECODER),1) CFLAGS += -DENABLE_DTMF_DECODER endif diff --git a/README.md b/README.md index b59f2f9..2b00b90 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ ENABLE_MAIN_KEY_HOLD := 1 initial F-key press not needed, instead ENABLE_BOOT_BEEPS := 0 give user audio feedback on volume knob position at boot-up ENABLE_DTMF_DECODER := 1 live on-screen DTMF decoder ENABLE_COMPANDER := 1 compander option - setting not yet saved +ENABLE_SHOW_CHARGE_LEVEL := 1 show the charge level when the radio is on charge #ENABLE_SINGLE_VFO_CHAN := 1 not yet implemented - single VFO on display when possible #ENABLE_BAND_SCOPE := 1 not yet implemented - spectrum/pan-adapter ``` diff --git a/firmware b/firmware index 2ed3312..aa76bcb 100644 Binary files a/firmware and b/firmware differ diff --git a/firmware.bin b/firmware.bin index 98f615d..464ecc6 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 04254d2..5fdf81f 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/ui/main.c b/ui/main.c index 497e659..a85ada8 100644 --- a/ui/main.c +++ b/ui/main.c @@ -465,16 +465,18 @@ void UI_DisplayMain(void) #endif if (gChargingWithTypeC) { // charging .. show the battery state - const uint16_t volts = (gBatteryVoltageAverage < gMin_bat_v) ? gMin_bat_v : - (gBatteryVoltageAverage > gMax_bat_v) ? gMax_bat_v : - gBatteryVoltageAverage; - - sprintf(String, "Charge %u.%02uV %u%%", - gBatteryVoltageAverage / 100, - gBatteryVoltageAverage % 100, - (100 * (volts - gMin_bat_v)) / (gMax_bat_v - gMin_bat_v)); - - UI_PrintStringSmall(String, 2, 0, 3); + #ifdef ENABLE_SHOW_CHARGE_LEVEL + const uint16_t volts = (gBatteryVoltageAverage < gMin_bat_v) ? gMin_bat_v : + (gBatteryVoltageAverage > gMax_bat_v) ? gMax_bat_v : + gBatteryVoltageAverage; + + sprintf(String, "Charge %u.%02uV %u%%", + gBatteryVoltageAverage / 100, + gBatteryVoltageAverage % 100, + (100 * (volts - gMin_bat_v)) / (gMax_bat_v - gMin_bat_v)); + + UI_PrintStringSmall(String, 2, 0, 3); + #endif } }