diff --git a/Makefile b/Makefile index 849e661..c7e0521 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ ENABLE_VOICE := 0 ENABLE_VOX := 0 ENABLE_ALARM := 0 ENABLE_TX1750 := 0 +ENABLE_PWRON_PASSWORD := 1 ENABLE_BIG_FREQ := 0 ENABLE_SMALL_BOLD := 1 ENABLE_KEEP_MEM_NAME := 1 @@ -133,7 +134,9 @@ ifeq ($(ENABLE_FMRADIO),1) endif OBJS += ui/helper.o OBJS += ui/inputbox.o -OBJS += ui/lock.o +ifeq ($(ENABLE_PWRON_PASSWORD),1) + OBJS += ui/lock.o +endif OBJS += ui/main.o OBJS += ui/menu.o OBJS += ui/scanner.o @@ -242,6 +245,9 @@ endif ifeq ($(ENABLE_TX1750),1) CFLAGS += -DENABLE_TX1750 endif +ifeq ($(ENABLE_PWRON_PASSWORD),1) + CFLAGS += -DENABLE_PWRON_PASSWORD +endif ifeq ($(ENABLE_KEEP_MEM_NAME),1) CFLAGS += -DENABLE_KEEP_MEM_NAME endif diff --git a/README.md b/README.md index af5a874..d586bc1 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ ENABLE_VOICE := 0 want to hear voices ? ENABLE_VOX := 0 ENABLE_ALARM := 0 TX alarms ENABLE_1750HZ := 0 side key 1750Hz TX tone (older style repeater access) +ENABLE_PWRON_PASSWORD := 1 enable the power-on password stuff ENABLE_BIG_FREQ := 0 big font frequencies (like original QS firmware) ENABLE_SMALL_BOLD := 1 bold channel name/no. (when name + freq channel display mode) ENABLE_KEEP_MEM_NAME := 1 maintain channel name when (re)saving memory channel diff --git a/firmware.bin b/firmware.bin index bf60880..9858669 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index b02f8a5..3b838c8 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/main.c b/main.c index 7df450b..a7d82f2 100644 --- a/main.c +++ b/main.c @@ -174,12 +174,14 @@ void Main(void) } } - if (gEeprom.POWER_ON_PASSWORD < 1000000) - { - bIsInLockScreen = true; - UI_DisplayLock(); - bIsInLockScreen = false; - } + #ifdef ENABLE_PWRON_PASSWORD + if (gEeprom.POWER_ON_PASSWORD < 1000000) + { + bIsInLockScreen = true; + UI_DisplayLock(); + bIsInLockScreen = false; + } + #endif BOOT_ProcessMode(BootMode); diff --git a/settings.c b/settings.c index 7755012..b7821f8 100644 --- a/settings.c +++ b/settings.c @@ -117,8 +117,10 @@ void SETTINGS_SaveSettings(void) EEPROM_WriteBuffer(0x0E90, State); memset(Password, 0xFF, sizeof(Password)); - Password[0] = gEeprom.POWER_ON_PASSWORD; - EEPROM_WriteBuffer(0x0E98, State); + #ifdef ENABLE_PWRON_PASSWORD + Password[0] = gEeprom.POWER_ON_PASSWORD; + #endif + EEPROM_WriteBuffer(0x0E98, Password); #ifdef ENABLE_VOICE memset(State, 0xFF, sizeof(State)); diff --git a/ui/lock.c b/ui/lock.c index ea5e87f..1dca0a2 100644 --- a/ui/lock.c +++ b/ui/lock.c @@ -14,6 +14,8 @@ * limitations under the License. */ +#ifdef ENABLE_PWRON_PASSWORD + #include #include "ARMCM0.h" @@ -156,3 +158,5 @@ void UI_DisplayLock(void) } } } + +#endif diff --git a/ui/lock.h b/ui/lock.h index 4ad4f49..e42758d 100644 --- a/ui/lock.h +++ b/ui/lock.h @@ -17,7 +17,9 @@ #ifndef UI_LOCK_H #define UI_LOCK_H -void UI_DisplayLock(void); +#ifdef ENABLE_PWRON_PASSWORD + void UI_DisplayLock(void); +#endif #endif