mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
reduce flash
This commit is contained in:
parent
859f0215f4
commit
3e0795eb8d
7 changed files with 60 additions and 75 deletions
|
@ -20,25 +20,7 @@
|
|||
</configurations>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="mdc tx end test">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/action.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/action.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/app.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/app.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/dtmf.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/dtmf.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/dtmf.h" beforeDir="false" afterPath="$PROJECT_DIR$/app/dtmf.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/main.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/mdc1200.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/mdc1200.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/mdc1200.h" beforeDir="false" afterPath="$PROJECT_DIR$/app/mdc1200.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/driver/bk4819.c" beforeDir="false" afterPath="$PROJECT_DIR$/driver/bk4819.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/driver/bk4819.h" beforeDir="false" afterPath="$PROJECT_DIR$/driver/bk4819.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/functions.c" beforeDir="false" afterPath="$PROJECT_DIR$/functions.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/radio.c" beforeDir="false" afterPath="$PROJECT_DIR$/radio.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/settings.c" beforeDir="false" afterPath="$PROJECT_DIR$/settings.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/settings.h" beforeDir="false" afterPath="$PROJECT_DIR$/settings.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ui/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/main.c" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/版本说明.txt" beforeDir="false" afterPath="$PROJECT_DIR$/版本说明.txt" afterDir="false" />
|
||||
</list>
|
||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="test create" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
|
@ -147,7 +129,7 @@
|
|||
<workItem from="1701325367312" duration="22657000" />
|
||||
<workItem from="1701413653518" duration="3544000" />
|
||||
<workItem from="1701430185864" duration="10115000" />
|
||||
<workItem from="1701559895523" duration="17108000" />
|
||||
<workItem from="1701559895523" duration="17530000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="bug fix">
|
||||
<created>1701136012311</created>
|
||||
|
@ -303,7 +285,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1701577655637</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="23" />
|
||||
<task id="LOCAL-00023" summary="test create">
|
||||
<created>1701669851368</created>
|
||||
<option name="number" value="00023" />
|
||||
<option name="presentableId" value="LOCAL-00023" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1701669851368</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="24" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
@ -329,6 +318,7 @@
|
|||
<MESSAGE value="修复切换调制模式时亚音消失问题" />
|
||||
<MESSAGE value="按键锁定改回以前逻辑" />
|
||||
<MESSAGE value="mdc tx end test" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="mdc tx end test" />
|
||||
<MESSAGE value="test create" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="test create" />
|
||||
</component>
|
||||
</project>
|
20
app/menu.c
20
app/menu.c
|
@ -183,10 +183,10 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
|||
*pMax = ARRAY_SIZE(gSubMenu_ROGER) - 1;
|
||||
break;
|
||||
|
||||
case MENU_PONMSG:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_OFF_ON) - 1;
|
||||
break;
|
||||
// case MENU_PONMSG:
|
||||
// *pMin = 0;
|
||||
// *pMax = ARRAY_SIZE(gSubMenu_OFF_ON) - 1;
|
||||
// break;
|
||||
|
||||
case MENU_R_DCS:
|
||||
case MENU_T_DCS:
|
||||
|
@ -692,9 +692,9 @@ void MENU_AcceptSetting(void)
|
|||
}
|
||||
return;
|
||||
#endif
|
||||
case MENU_PONMSG:
|
||||
gEeprom.POWER_ON_DISPLAY_MODE = gSubMenuSelection;
|
||||
break;
|
||||
// case MENU_PONMSG:
|
||||
// gEeprom.POWER_ON_DISPLAY_MODE = gSubMenuSelection;
|
||||
// break;
|
||||
|
||||
case MENU_ROGER:
|
||||
gEeprom.ROGER = gSubMenuSelection;
|
||||
|
@ -1078,9 +1078,9 @@ void MENU_ShowCurrentSetting(void)
|
|||
gSubMenuSelection = gSetting_live_DTMF_decoder;
|
||||
break;
|
||||
|
||||
case MENU_PONMSG:
|
||||
gSubMenuSelection = gEeprom.POWER_ON_DISPLAY_MODE;
|
||||
break;
|
||||
// case MENU_PONMSG:
|
||||
// gSubMenuSelection = gEeprom.POWER_ON_DISPLAY_MODE;
|
||||
// break;
|
||||
|
||||
case MENU_ROGER:
|
||||
gSubMenuSelection = gEeprom.ROGER;
|
||||
|
|
34
settings.c
34
settings.c
|
@ -63,7 +63,7 @@ void SETTINGS_InitEEPROM(void)
|
|||
// 0E78..0E7F
|
||||
EEPROM_ReadBuffer(0x0E78, Data, 8);
|
||||
gEeprom.BACKLIGHT_MAX = (Data[0] & 0xF) <= 10 ? (Data[0] & 0xF) : 10;
|
||||
gEeprom.BACKLIGHT_MIN = (Data[0] >> 4) < gEeprom.BACKLIGHT_MAX ? (Data[0] >> 4) : 0;
|
||||
//gEeprom.BACKLIGHT_MIN = (Data[0] >> 4) < gEeprom.BACKLIGHT_MAX ? (Data[0] >> 4) : 0;
|
||||
#ifdef ENABLE_BLMIN_TMP_OFF
|
||||
gEeprom.BACKLIGHT_MIN_STAT = BLMIN_STAT_ON;
|
||||
#endif
|
||||
|
@ -118,14 +118,14 @@ void SETTINGS_InitEEPROM(void)
|
|||
// 0E90..0E97
|
||||
EEPROM_ReadBuffer(0x0E90, Data, 8);
|
||||
gEeprom.BEEP_CONTROL = Data[0] & 1;
|
||||
gEeprom.KEY_M_LONG_PRESS_ACTION = ((Data[0] >> 1) < ACTION_OPT_LEN) ? (Data[0] >> 1) : ACTION_OPT_NONE;
|
||||
gEeprom.KEY_1_SHORT_PRESS_ACTION = (Data[1] < ACTION_OPT_LEN) ? Data[1] : ACTION_OPT_MONITOR;
|
||||
gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < ACTION_OPT_LEN) ? Data[2] : ACTION_OPT_FLASHLIGHT;
|
||||
gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < ACTION_OPT_LEN) ? Data[3] : ACTION_OPT_SCAN;
|
||||
gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_NONE;
|
||||
// gEeprom.KEY_M_LONG_PRESS_ACTION = ((Data[0] >> 1) < ACTION_OPT_LEN) ? (Data[0] >> 1) : ACTION_OPT_NONE;
|
||||
// gEeprom.KEY_1_SHORT_PRESS_ACTION = (Data[1] < ACTION_OPT_LEN) ? Data[1] : ACTION_OPT_MONITOR;
|
||||
// gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < ACTION_OPT_LEN) ? Data[2] : ACTION_OPT_FLASHLIGHT;
|
||||
// gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < ACTION_OPT_LEN) ? Data[3] : ACTION_OPT_SCAN;
|
||||
// gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_NONE;
|
||||
gEeprom.SCAN_RESUME_MODE = (Data[5] < 3) ? Data[5] : SCAN_RESUME_CO;
|
||||
gEeprom.AUTO_KEYPAD_LOCK = (Data[6] < 2) ? Data[6] : false;
|
||||
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_MESSAGE;
|
||||
// gEeprom.AUTO_KEYPAD_LOCK = (Data[6] < 2) ? Data[6] : false;
|
||||
// gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_MESSAGE;
|
||||
|
||||
// 0E98..0E9F
|
||||
EEPROM_ReadBuffer(0x0E98, Data, 8);
|
||||
|
@ -494,7 +494,7 @@ void SETTINGS_SaveSettings(void)
|
|||
State[7] = gEeprom.MIC_SENSITIVITY;
|
||||
EEPROM_WriteBuffer(0x0E70, State);
|
||||
|
||||
State[0] = (gEeprom.BACKLIGHT_MIN << 4) + gEeprom.BACKLIGHT_MAX;
|
||||
State[0] = (/*gEeprom.BACKLIGHT_MIN*/0 << 4) + gEeprom.BACKLIGHT_MAX;
|
||||
State[1] = gEeprom.CHANNEL_DISPLAY_MODE;
|
||||
State[2] = gEeprom.CROSS_BAND_RX_TX;
|
||||
State[3] = gEeprom.BATTERY_SAVE;
|
||||
|
@ -505,14 +505,14 @@ void SETTINGS_SaveSettings(void)
|
|||
EEPROM_WriteBuffer(0x0E78, State);
|
||||
|
||||
State[0] = gEeprom.BEEP_CONTROL;
|
||||
State[0] |= gEeprom.KEY_M_LONG_PRESS_ACTION << 1;
|
||||
State[1] = gEeprom.KEY_1_SHORT_PRESS_ACTION;
|
||||
State[2] = gEeprom.KEY_1_LONG_PRESS_ACTION;
|
||||
State[3] = gEeprom.KEY_2_SHORT_PRESS_ACTION;
|
||||
State[4] = gEeprom.KEY_2_LONG_PRESS_ACTION;
|
||||
State[5] = gEeprom.SCAN_RESUME_MODE;
|
||||
State[6] = gEeprom.AUTO_KEYPAD_LOCK;
|
||||
State[7] = gEeprom.POWER_ON_DISPLAY_MODE;
|
||||
State[0] |= 0;//gEeprom.KEY_M_LONG_PRESS_ACTION << 1;
|
||||
State[1] = 0;//gEeprom.KEY_1_SHORT_PRESS_ACTION;
|
||||
State[2] = 0;//gEeprom.KEY_1_LONG_PRESS_ACTION;
|
||||
State[3] = 0;//gEeprom.KEY_2_SHORT_PRESS_ACTION;
|
||||
State[4] = 0;//gEeprom.KEY_2_LONG_PRESS_ACTION;
|
||||
State[5] = //gEeprom.SCAN_RESUME_MODE;
|
||||
State[6] = 0;//gEeprom.AUTO_KEYPAD_LOCK;
|
||||
State[7] = 0;//gEeprom.POWER_ON_DISPLAY_MODE;
|
||||
EEPROM_WriteBuffer(0x0E90, State);
|
||||
|
||||
memset(Password, 0xFF, sizeof(Password));
|
||||
|
|
26
settings.h
26
settings.h
|
@ -25,11 +25,11 @@
|
|||
#include "radio.h"
|
||||
#include <driver/backlight.h>
|
||||
|
||||
enum POWER_OnDisplayMode_t {
|
||||
POWER_ON_DISPLAY_MODE_NONE
|
||||
,
|
||||
POWER_ON_DISPLAY_MODE_MESSAGE,
|
||||
};
|
||||
//enum POWER_OnDisplayMode_t {
|
||||
// POWER_ON_DISPLAY_MODE_NONE
|
||||
//,
|
||||
// POWER_ON_DISPLAY_MODE_MESSAGE,
|
||||
//};
|
||||
typedef enum POWER_OnDisplayMode_t POWER_OnDisplayMode_t;
|
||||
|
||||
enum {
|
||||
|
@ -183,17 +183,17 @@ typedef struct {
|
|||
uint8_t field37_0x32;
|
||||
uint8_t field38_0x33;
|
||||
|
||||
bool AUTO_KEYPAD_LOCK;
|
||||
// bool AUTO_KEYPAD_LOCK;
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
ALARM_Mode_t ALARM_MODE;
|
||||
#endif
|
||||
POWER_OnDisplayMode_t POWER_ON_DISPLAY_MODE;
|
||||
// POWER_OnDisplayMode_t POWER_ON_DISPLAY_MODE;
|
||||
ROGER_Mode_t ROGER;
|
||||
uint8_t REPEATER_TAIL_TONE_ELIMINATION;
|
||||
uint8_t KEY_1_SHORT_PRESS_ACTION;
|
||||
uint8_t KEY_1_LONG_PRESS_ACTION;
|
||||
uint8_t KEY_2_SHORT_PRESS_ACTION;
|
||||
uint8_t KEY_2_LONG_PRESS_ACTION;
|
||||
// uint8_t KEY_1_SHORT_PRESS_ACTION;
|
||||
// uint8_t KEY_1_LONG_PRESS_ACTION;
|
||||
// uint8_t KEY_2_SHORT_PRESS_ACTION;
|
||||
// uint8_t KEY_2_LONG_PRESS_ACTION;
|
||||
uint8_t MIC_SENSITIVITY;
|
||||
uint8_t MIC_SENSITIVITY_TUNING;
|
||||
uint8_t CHAN_1_CALL;
|
||||
|
@ -243,8 +243,8 @@ typedef struct {
|
|||
uint8_t field78_0x96;
|
||||
uint8_t field79_0x97;
|
||||
|
||||
uint8_t KEY_M_LONG_PRESS_ACTION;
|
||||
uint8_t BACKLIGHT_MIN;
|
||||
// uint8_t KEY_M_LONG_PRESS_ACTION;
|
||||
// uint8_t BACKLIGHT_MIN;
|
||||
#ifdef ENABLE_BLMIN_TMP_OFF
|
||||
BLMIN_STAT_t BACKLIGHT_MIN_STAT;
|
||||
#endif
|
||||
|
|
12
ui/menu.c
12
ui/menu.c
|
@ -60,7 +60,7 @@ const t_menu_item MenuList[] =
|
|||
{/*"BatSav",*/ VOICE_ID_SAVE_MODE, MENU_SAVE ,省电模式}, // was "SAVE"
|
||||
{/*"Mic",*/ VOICE_ID_INVALID, MENU_MIC ,麦克风增益},
|
||||
{/*"ChDisp",*/ VOICE_ID_INVALID, MENU_MDF ,信道显示模式}, // was "MDF"
|
||||
{/*"POnMsg",*/ VOICE_ID_INVALID, MENU_PONMSG ,开机显示},
|
||||
// {/*"POnMsg",*/ VOICE_ID_INVALID, MENU_PONMSG ,开机显示},
|
||||
{/*"BackLt",*/ VOICE_ID_INVALID, MENU_ABR ,自动背光}, // was "ABR"
|
||||
{/*"BLMax",*/ VOICE_ID_INVALID, MENU_ABR_MAX ,背光亮度},
|
||||
{/*"Roger",*/ VOICE_ID_INVALID, MENU_ROGER ,发送结束音},
|
||||
|
@ -840,11 +840,11 @@ void UI_DisplayMenu(void) {
|
|||
memmove(String, Contact, 8);
|
||||
break;
|
||||
#endif
|
||||
case MENU_PONMSG:
|
||||
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
|
||||
|
||||
|
||||
break;
|
||||
// case MENU_PONMSG:
|
||||
// strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
|
||||
//
|
||||
//
|
||||
// break;
|
||||
|
||||
case MENU_ROGER:
|
||||
strcpy(String, gSubMenu_ROGER[gSubMenuSelection]);
|
||||
|
|
|
@ -99,7 +99,7 @@ enum
|
|||
#endif
|
||||
|
||||
MENU_D_LIVE_DEC,
|
||||
MENU_PONMSG,
|
||||
// MENU_PONMSG,
|
||||
MENU_ROGER,
|
||||
// MENU_VOL,
|
||||
//MENU_BAT_TXT,
|
||||
|
|
|
@ -51,12 +51,7 @@ void UI_DisplayWelcome(void) {
|
|||
memset(gStatusLine, 0, sizeof(gStatusLine));
|
||||
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
|
||||
|
||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_NONE) {
|
||||
ST7565_FillScreen(0xFF);
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
|
||||
#
|
||||
|
@ -85,6 +80,6 @@ void UI_DisplayWelcome(void) {
|
|||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue