diff --git a/Makefile b/Makefile index d77aa07..298f113 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ ENABLE_MAIN_KEY_HOLD := 1 ENABLE_BOOT_BEEPS := 0 ENABLE_COMPANDER := 1 ENABLE_SHOW_CHARGE_LEVEL := 1 +ENABLE_REVERSE_BAT_SYMBOL := 1 ENABLE_STATUSBAR_VOLTAGE := 0 ENABLE_STATUSBAR_PERCENTAGE := 1 #ENABLE_SINGLE_VFO_CHAN := 1 @@ -194,6 +195,9 @@ endif ifeq ($(ENABLE_SHOW_CHARGE_LEVEL),1) CFLAGS += -DENABLE_SHOW_CHARGE_LEVEL endif +ifeq ($(ENABLE_REVERSE_BAT_SYMBOL),1) + CFLAGS += -DENABLE_REVERSE_BAT_SYMBOL +endif ifeq ($(ENABLE_STATUSBAR_VOLTAGE),1) CFLAGS += -DENABLE_STATUSBAR_VOLTAGE endif diff --git a/README.md b/README.md index 78569f1..6605113 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_COMPANDER := 1 compander option - setting not yet saved ENABLE_SHOW_CHARGE_LEVEL := 1 show the charge level when the radio is on charge +ENABLE_REVERSE_BAT_SYMBOL := 1 reverse the battery symbol on the status bar ENABLE_STATUSBAR_VOLTAGE := 0 show the battery voltage on the top status bar - when possible ENABLE_STATUSBAR_PERCENTAGE := 1 show the battery percentage on the top status bar - when possible #ENABLE_SINGLE_VFO_CHAN := 1 not yet implemented - single VFO on display when possible diff --git a/bitmaps.c b/bitmaps.c index fea3feb..02991ce 100644 --- a/bitmaps.c +++ b/bitmaps.c @@ -29,110 +29,219 @@ const uint8_t BITMAP_PowerSave[8] = #endif }; -const uint8_t BITMAP_BatteryLevel1[17] = -{ - 0b00000000, - 0b00111110, - 0b00100010, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01111111 -}; - -const uint8_t BITMAP_BatteryLevel2[17] = -{ - 0b00000000, - 0b00111110, - 0b00100010, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01111111 -}; - -const uint8_t BITMAP_BatteryLevel3[17] = -{ - 0b00000000, - 0b00111110, - 0b00100010, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01111111 -}; - -const uint8_t BITMAP_BatteryLevel4[17] = -{ - 0b00000000, - 0b00111110, - 0b00100010, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01111111 -}; - -const uint8_t BITMAP_BatteryLevel5[17] = -{ - 0b00000000, - 0b00111110, - 0b00100010, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01011101, - 0b01011101, - 0b01000001, - 0b01111111 -}; +#ifndef ENABLE_REVERSE_BAT_SYMBOL + // Quansheng way (+ pole to the left) + const uint8_t BITMAP_BatteryLevel1[17] = + { + 0b00000000, + 0b00111110, + 0b00100010, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01111111 + }; + + const uint8_t BITMAP_BatteryLevel2[17] = + { + 0b00000000, + 0b00111110, + 0b00100010, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01111111 + }; + + const uint8_t BITMAP_BatteryLevel3[17] = + { + 0b00000000, + 0b00111110, + 0b00100010, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01111111 + }; + + const uint8_t BITMAP_BatteryLevel4[17] = + { + 0b00000000, + 0b00111110, + 0b00100010, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01111111 + }; + + const uint8_t BITMAP_BatteryLevel5[17] = + { + 0b00000000, + 0b00111110, + 0b00100010, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01111111 + }; +#else + // reversed (+ pole to the right) + const uint8_t BITMAP_BatteryLevel1[17] = + { + 0b00000000, + 0b01111111, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b00100010, + 0b00111110 + }; + + const uint8_t BITMAP_BatteryLevel2[17] = + { + 0b00000000, + 0b01111111, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b00100010, + 0b00111110 + }; + + const uint8_t BITMAP_BatteryLevel3[17] = + { + 0b00000000, + 0b01111111, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b00100010, + 0b00111110 + }; + + const uint8_t BITMAP_BatteryLevel4[17] = + { + 0b00000000, + 0b01111111, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01000001, + 0b01000001, + 0b01000001, + 0b00100010, + 0b00111110 + }; + + const uint8_t BITMAP_BatteryLevel5[17] = + { + 0b00000000, + 0b01111111, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b01011101, + 0b01011101, + 0b01000001, + 0b00100010, + 0b00111110 + }; +#endif const uint8_t BITMAP_USB_C[9] = { // USB symbol diff --git a/firmware b/firmware index d9e7188..9532731 100644 Binary files a/firmware and b/firmware differ diff --git a/firmware.bin b/firmware.bin index 5233efe..2d682ea 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 05400ab..8a0cd05 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ