mirror of
https://github.com/egzumer/uv-k5-firmware-custom
synced 2024-11-21 17:19:57 +00:00
Added power-on compile option
This commit is contained in:
parent
16c908f0bf
commit
f25e0230f0
8
Makefile
8
Makefile
@ -15,6 +15,7 @@ ENABLE_VOICE := 0
|
|||||||
ENABLE_VOX := 0
|
ENABLE_VOX := 0
|
||||||
ENABLE_ALARM := 0
|
ENABLE_ALARM := 0
|
||||||
ENABLE_TX1750 := 0
|
ENABLE_TX1750 := 0
|
||||||
|
ENABLE_PWRON_PASSWORD := 1
|
||||||
ENABLE_BIG_FREQ := 0
|
ENABLE_BIG_FREQ := 0
|
||||||
ENABLE_SMALL_BOLD := 1
|
ENABLE_SMALL_BOLD := 1
|
||||||
ENABLE_KEEP_MEM_NAME := 1
|
ENABLE_KEEP_MEM_NAME := 1
|
||||||
@ -133,7 +134,9 @@ ifeq ($(ENABLE_FMRADIO),1)
|
|||||||
endif
|
endif
|
||||||
OBJS += ui/helper.o
|
OBJS += ui/helper.o
|
||||||
OBJS += ui/inputbox.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/main.o
|
||||||
OBJS += ui/menu.o
|
OBJS += ui/menu.o
|
||||||
OBJS += ui/scanner.o
|
OBJS += ui/scanner.o
|
||||||
@ -242,6 +245,9 @@ endif
|
|||||||
ifeq ($(ENABLE_TX1750),1)
|
ifeq ($(ENABLE_TX1750),1)
|
||||||
CFLAGS += -DENABLE_TX1750
|
CFLAGS += -DENABLE_TX1750
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ENABLE_PWRON_PASSWORD),1)
|
||||||
|
CFLAGS += -DENABLE_PWRON_PASSWORD
|
||||||
|
endif
|
||||||
ifeq ($(ENABLE_KEEP_MEM_NAME),1)
|
ifeq ($(ENABLE_KEEP_MEM_NAME),1)
|
||||||
CFLAGS += -DENABLE_KEEP_MEM_NAME
|
CFLAGS += -DENABLE_KEEP_MEM_NAME
|
||||||
endif
|
endif
|
||||||
|
@ -42,6 +42,7 @@ ENABLE_VOICE := 0 want to hear voices ?
|
|||||||
ENABLE_VOX := 0
|
ENABLE_VOX := 0
|
||||||
ENABLE_ALARM := 0 TX alarms
|
ENABLE_ALARM := 0 TX alarms
|
||||||
ENABLE_1750HZ := 0 side key 1750Hz TX tone (older style repeater access)
|
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_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_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
|
ENABLE_KEEP_MEM_NAME := 1 maintain channel name when (re)saving memory channel
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
14
main.c
14
main.c
@ -174,12 +174,14 @@ void Main(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gEeprom.POWER_ON_PASSWORD < 1000000)
|
#ifdef ENABLE_PWRON_PASSWORD
|
||||||
{
|
if (gEeprom.POWER_ON_PASSWORD < 1000000)
|
||||||
bIsInLockScreen = true;
|
{
|
||||||
UI_DisplayLock();
|
bIsInLockScreen = true;
|
||||||
bIsInLockScreen = false;
|
UI_DisplayLock();
|
||||||
}
|
bIsInLockScreen = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOT_ProcessMode(BootMode);
|
BOOT_ProcessMode(BootMode);
|
||||||
|
|
||||||
|
@ -117,8 +117,10 @@ void SETTINGS_SaveSettings(void)
|
|||||||
EEPROM_WriteBuffer(0x0E90, State);
|
EEPROM_WriteBuffer(0x0E90, State);
|
||||||
|
|
||||||
memset(Password, 0xFF, sizeof(Password));
|
memset(Password, 0xFF, sizeof(Password));
|
||||||
Password[0] = gEeprom.POWER_ON_PASSWORD;
|
#ifdef ENABLE_PWRON_PASSWORD
|
||||||
EEPROM_WriteBuffer(0x0E98, State);
|
Password[0] = gEeprom.POWER_ON_PASSWORD;
|
||||||
|
#endif
|
||||||
|
EEPROM_WriteBuffer(0x0E98, Password);
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
memset(State, 0xFF, sizeof(State));
|
memset(State, 0xFF, sizeof(State));
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef ENABLE_PWRON_PASSWORD
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "ARMCM0.h"
|
#include "ARMCM0.h"
|
||||||
@ -156,3 +158,5 @@ void UI_DisplayLock(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user