mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
.
This commit is contained in:
parent
aebd397221
commit
f20191568a
4
Makefile
4
Makefile
@ -10,7 +10,7 @@ ENABLE_OVERLAY := 0
|
|||||||
ENABLE_LTO := 1
|
ENABLE_LTO := 1
|
||||||
# UART Programming 2.9 kB
|
# UART Programming 2.9 kB
|
||||||
ENABLE_UART := 1
|
ENABLE_UART := 1
|
||||||
ENABLE_UART_DEBUG := 1
|
ENABLE_UART_DEBUG := 0
|
||||||
# AirCopy 2.5 kB
|
# AirCopy 2.5 kB
|
||||||
ENABLE_AIRCOPY := 0
|
ENABLE_AIRCOPY := 0
|
||||||
ENABLE_AIRCOPY_REMEMBER_FREQ := 1
|
ENABLE_AIRCOPY_REMEMBER_FREQ := 1
|
||||||
@ -27,7 +27,7 @@ ENABLE_NOAA := 0
|
|||||||
ENABLE_VOICE := 0
|
ENABLE_VOICE := 0
|
||||||
ENABLE_MUTE_RADIO_FOR_VOICE := 0
|
ENABLE_MUTE_RADIO_FOR_VOICE := 0
|
||||||
# Tx on Voice 1.0 kB
|
# Tx on Voice 1.0 kB
|
||||||
ENABLE_VOX := 0
|
ENABLE_VOX := 1
|
||||||
ENABLE_VOX_MORE_SENSITIVE := 1
|
ENABLE_VOX_MORE_SENSITIVE := 1
|
||||||
ENABLE_REDUCE_LOW_MID_TX_POWER := 1
|
ENABLE_REDUCE_LOW_MID_TX_POWER := 1
|
||||||
# Tx Alarm 600 B
|
# Tx Alarm 600 B
|
||||||
|
@ -1842,15 +1842,15 @@ void APP_process_power_save(void)
|
|||||||
if (g_current_function == FUNCTION_POWER_SAVE)
|
if (g_current_function == FUNCTION_POWER_SAVE)
|
||||||
FUNCTION_Select(FUNCTION_RECEIVE); // come out of power save mode
|
FUNCTION_Select(FUNCTION_RECEIVE); // come out of power save mode
|
||||||
|
|
||||||
g_schedule_power_save_tick_10ms = battery_save_count_10ms; // stay out of power save mode
|
g_power_save_pause_tick_10ms = power_save_pause_10ms; // stay out of power save mode
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (g_schedule_power_save)
|
if (g_power_save_pause_done)
|
||||||
{ // enter power save
|
{ // enter power save
|
||||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_schedule_power_save = false;
|
g_power_save_pause_done = false;
|
||||||
|
|
||||||
// **************************
|
// **************************
|
||||||
|
|
||||||
@ -2524,7 +2524,8 @@ static void APP_process_key(const key_code_t Key, const bool key_pressed, const
|
|||||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||||
|
|
||||||
// stay awake - for now
|
// stay awake - for now
|
||||||
g_schedule_power_save_tick_10ms = battery_save_count_10ms;
|
g_power_save_pause_tick_10ms = power_save_pause_10ms;
|
||||||
|
g_power_save_pause_done = false;
|
||||||
|
|
||||||
#ifdef ENABLE_KEYLOCK
|
#ifdef ENABLE_KEYLOCK
|
||||||
// keep the auto keylock at bay
|
// keep the auto keylock at bay
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -300,8 +300,8 @@ void FUNCTION_Select(function_type_t Function)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_schedule_power_save_tick_10ms = battery_save_count_10ms;
|
g_power_save_pause_tick_10ms = power_save_pause_10ms;
|
||||||
g_schedule_power_save = false;
|
g_power_save_pause_done = false;
|
||||||
|
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
g_fm_restore_tick_10ms = 0;
|
g_fm_restore_tick_10ms = 0;
|
||||||
|
8
misc.c
8
misc.c
@ -66,8 +66,7 @@ const uint16_t scan_pause_cdcss_10ms = 300 / 10; // 300ms
|
|||||||
const uint16_t scan_pause_freq_10ms = 100 / 10; // 100ms
|
const uint16_t scan_pause_freq_10ms = 100 / 10; // 100ms
|
||||||
const uint16_t scan_pause_chan_10ms = 200 / 10; // 200ms
|
const uint16_t scan_pause_chan_10ms = 200 / 10; // 200ms
|
||||||
|
|
||||||
const uint16_t battery_save_count_10ms = 10000 / 10; // 10 seconds
|
const uint16_t power_save_pause_10ms = 10000 / 10; // 10 seconds
|
||||||
|
|
||||||
const uint16_t power_save1_10ms = 100 / 10; // 100ms
|
const uint16_t power_save1_10ms = 100 / 10; // 100ms
|
||||||
const uint16_t power_save2_10ms = 200 / 10; // 200ms
|
const uint16_t power_save2_10ms = 200 / 10; // 200ms
|
||||||
|
|
||||||
@ -92,9 +91,8 @@ bool g_monitor_enabled;
|
|||||||
bool g_has_aes_key;
|
bool g_has_aes_key;
|
||||||
uint32_t g_challenge[4];
|
uint32_t g_challenge[4];
|
||||||
|
|
||||||
volatile uint16_t g_schedule_power_save_tick_10ms = battery_save_count_10ms;
|
volatile uint16_t g_power_save_pause_tick_10ms = power_save_pause_10ms;
|
||||||
volatile bool g_schedule_power_save;
|
volatile bool g_power_save_pause_done;
|
||||||
|
|
||||||
volatile bool g_power_save_expired;
|
volatile bool g_power_save_expired;
|
||||||
|
|
||||||
volatile uint16_t g_dual_watch_tick_10ms;
|
volatile uint16_t g_dual_watch_tick_10ms;
|
||||||
|
7
misc.h
7
misc.h
@ -148,7 +148,7 @@ extern const uint8_t key_repeat_10ms;
|
|||||||
extern const uint16_t search_freq_css_10ms;
|
extern const uint16_t search_freq_css_10ms;
|
||||||
extern const uint16_t search_10ms;
|
extern const uint16_t search_10ms;
|
||||||
|
|
||||||
extern const uint16_t battery_save_count_10ms;
|
extern const uint16_t power_save_pause_10ms;
|
||||||
|
|
||||||
extern const uint16_t power_save1_10ms;
|
extern const uint16_t power_save1_10ms;
|
||||||
extern const uint16_t power_save2_10ms;
|
extern const uint16_t power_save2_10ms;
|
||||||
@ -183,9 +183,8 @@ extern const uint32_t g_default_aes_key[4];
|
|||||||
extern bool g_has_aes_key;
|
extern bool g_has_aes_key;
|
||||||
extern uint32_t g_challenge[4];
|
extern uint32_t g_challenge[4];
|
||||||
|
|
||||||
extern volatile uint16_t g_schedule_power_save_tick_10ms;
|
extern volatile uint16_t g_power_save_pause_tick_10ms;
|
||||||
extern volatile bool g_schedule_power_save;
|
extern volatile bool g_power_save_pause_done;
|
||||||
|
|
||||||
extern volatile bool g_power_save_expired;
|
extern volatile bool g_power_save_expired;
|
||||||
|
|
||||||
extern volatile uint16_t g_dual_watch_tick_10ms;
|
extern volatile uint16_t g_dual_watch_tick_10ms;
|
||||||
|
@ -73,7 +73,7 @@ void SystickHandler(void)
|
|||||||
DECREMENT(g_found_ctcss_tick_10ms);
|
DECREMENT(g_found_ctcss_tick_10ms);
|
||||||
|
|
||||||
if (g_current_function == FUNCTION_FOREGROUND)
|
if (g_current_function == FUNCTION_FOREGROUND)
|
||||||
DECREMENT_AND_TRIGGER(g_schedule_power_save_tick_10ms, g_schedule_power_save);
|
DECREMENT_AND_TRIGGER(g_power_save_pause_tick_10ms, g_power_save_pause_done);
|
||||||
|
|
||||||
if (g_current_function == FUNCTION_POWER_SAVE)
|
if (g_current_function == FUNCTION_POWER_SAVE)
|
||||||
DECREMENT_AND_TRIGGER(g_power_save_tick_10ms, g_power_save_expired);
|
DECREMENT_AND_TRIGGER(g_power_save_tick_10ms, g_power_save_expired);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user