reduce flash

This commit is contained in:
wu58430 2023-12-04 14:18:36 +08:00
parent 859f0215f4
commit 3e0795eb8d
7 changed files with 60 additions and 75 deletions

View file

@ -20,25 +20,7 @@
</configurations> </configurations>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="mdc tx end test"> <list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="test create" />
<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>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -147,7 +129,7 @@
<workItem from="1701325367312" duration="22657000" /> <workItem from="1701325367312" duration="22657000" />
<workItem from="1701413653518" duration="3544000" /> <workItem from="1701413653518" duration="3544000" />
<workItem from="1701430185864" duration="10115000" /> <workItem from="1701430185864" duration="10115000" />
<workItem from="1701559895523" duration="17108000" /> <workItem from="1701559895523" duration="17530000" />
</task> </task>
<task id="LOCAL-00001" summary="bug fix"> <task id="LOCAL-00001" summary="bug fix">
<created>1701136012311</created> <created>1701136012311</created>
@ -303,7 +285,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1701577655637</updated> <updated>1701577655637</updated>
</task> </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 /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@ -329,6 +318,7 @@
<MESSAGE value="修复切换调制模式时亚音消失问题" /> <MESSAGE value="修复切换调制模式时亚音消失问题" />
<MESSAGE value="按键锁定改回以前逻辑" /> <MESSAGE value="按键锁定改回以前逻辑" />
<MESSAGE value="mdc tx end test" /> <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> </component>
</project> </project>

View file

@ -183,10 +183,10 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
*pMax = ARRAY_SIZE(gSubMenu_ROGER) - 1; *pMax = ARRAY_SIZE(gSubMenu_ROGER) - 1;
break; break;
case MENU_PONMSG: // case MENU_PONMSG:
*pMin = 0; // *pMin = 0;
*pMax = ARRAY_SIZE(gSubMenu_OFF_ON) - 1; // *pMax = ARRAY_SIZE(gSubMenu_OFF_ON) - 1;
break; // break;
case MENU_R_DCS: case MENU_R_DCS:
case MENU_T_DCS: case MENU_T_DCS:
@ -692,9 +692,9 @@ void MENU_AcceptSetting(void)
} }
return; return;
#endif #endif
case MENU_PONMSG: // case MENU_PONMSG:
gEeprom.POWER_ON_DISPLAY_MODE = gSubMenuSelection; // gEeprom.POWER_ON_DISPLAY_MODE = gSubMenuSelection;
break; // break;
case MENU_ROGER: case MENU_ROGER:
gEeprom.ROGER = gSubMenuSelection; gEeprom.ROGER = gSubMenuSelection;
@ -1078,9 +1078,9 @@ void MENU_ShowCurrentSetting(void)
gSubMenuSelection = gSetting_live_DTMF_decoder; gSubMenuSelection = gSetting_live_DTMF_decoder;
break; break;
case MENU_PONMSG: // case MENU_PONMSG:
gSubMenuSelection = gEeprom.POWER_ON_DISPLAY_MODE; // gSubMenuSelection = gEeprom.POWER_ON_DISPLAY_MODE;
break; // break;
case MENU_ROGER: case MENU_ROGER:
gSubMenuSelection = gEeprom.ROGER; gSubMenuSelection = gEeprom.ROGER;

View file

@ -63,7 +63,7 @@ void SETTINGS_InitEEPROM(void)
// 0E78..0E7F // 0E78..0E7F
EEPROM_ReadBuffer(0x0E78, Data, 8); EEPROM_ReadBuffer(0x0E78, Data, 8);
gEeprom.BACKLIGHT_MAX = (Data[0] & 0xF) <= 10 ? (Data[0] & 0xF) : 10; 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 #ifdef ENABLE_BLMIN_TMP_OFF
gEeprom.BACKLIGHT_MIN_STAT = BLMIN_STAT_ON; gEeprom.BACKLIGHT_MIN_STAT = BLMIN_STAT_ON;
#endif #endif
@ -118,14 +118,14 @@ void SETTINGS_InitEEPROM(void)
// 0E90..0E97 // 0E90..0E97
EEPROM_ReadBuffer(0x0E90, Data, 8); EEPROM_ReadBuffer(0x0E90, Data, 8);
gEeprom.BEEP_CONTROL = Data[0] & 1; 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_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_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_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_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_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.SCAN_RESUME_MODE = (Data[5] < 3) ? Data[5] : SCAN_RESUME_CO;
gEeprom.AUTO_KEYPAD_LOCK = (Data[6] < 2) ? Data[6] : false; // 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.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_MESSAGE;
// 0E98..0E9F // 0E98..0E9F
EEPROM_ReadBuffer(0x0E98, Data, 8); EEPROM_ReadBuffer(0x0E98, Data, 8);
@ -494,7 +494,7 @@ void SETTINGS_SaveSettings(void)
State[7] = gEeprom.MIC_SENSITIVITY; State[7] = gEeprom.MIC_SENSITIVITY;
EEPROM_WriteBuffer(0x0E70, State); 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[1] = gEeprom.CHANNEL_DISPLAY_MODE;
State[2] = gEeprom.CROSS_BAND_RX_TX; State[2] = gEeprom.CROSS_BAND_RX_TX;
State[3] = gEeprom.BATTERY_SAVE; State[3] = gEeprom.BATTERY_SAVE;
@ -505,14 +505,14 @@ void SETTINGS_SaveSettings(void)
EEPROM_WriteBuffer(0x0E78, State); EEPROM_WriteBuffer(0x0E78, State);
State[0] = gEeprom.BEEP_CONTROL; State[0] = gEeprom.BEEP_CONTROL;
State[0] |= gEeprom.KEY_M_LONG_PRESS_ACTION << 1; State[0] |= 0;//gEeprom.KEY_M_LONG_PRESS_ACTION << 1;
State[1] = gEeprom.KEY_1_SHORT_PRESS_ACTION; State[1] = 0;//gEeprom.KEY_1_SHORT_PRESS_ACTION;
State[2] = gEeprom.KEY_1_LONG_PRESS_ACTION; State[2] = 0;//gEeprom.KEY_1_LONG_PRESS_ACTION;
State[3] = gEeprom.KEY_2_SHORT_PRESS_ACTION; State[3] = 0;//gEeprom.KEY_2_SHORT_PRESS_ACTION;
State[4] = gEeprom.KEY_2_LONG_PRESS_ACTION; State[4] = 0;//gEeprom.KEY_2_LONG_PRESS_ACTION;
State[5] = gEeprom.SCAN_RESUME_MODE; State[5] = //gEeprom.SCAN_RESUME_MODE;
State[6] = gEeprom.AUTO_KEYPAD_LOCK; State[6] = 0;//gEeprom.AUTO_KEYPAD_LOCK;
State[7] = gEeprom.POWER_ON_DISPLAY_MODE; State[7] = 0;//gEeprom.POWER_ON_DISPLAY_MODE;
EEPROM_WriteBuffer(0x0E90, State); EEPROM_WriteBuffer(0x0E90, State);
memset(Password, 0xFF, sizeof(Password)); memset(Password, 0xFF, sizeof(Password));

View file

@ -25,11 +25,11 @@
#include "radio.h" #include "radio.h"
#include <driver/backlight.h> #include <driver/backlight.h>
enum POWER_OnDisplayMode_t { //enum POWER_OnDisplayMode_t {
POWER_ON_DISPLAY_MODE_NONE // POWER_ON_DISPLAY_MODE_NONE
, //,
POWER_ON_DISPLAY_MODE_MESSAGE, // POWER_ON_DISPLAY_MODE_MESSAGE,
}; //};
typedef enum POWER_OnDisplayMode_t POWER_OnDisplayMode_t; typedef enum POWER_OnDisplayMode_t POWER_OnDisplayMode_t;
enum { enum {
@ -183,17 +183,17 @@ typedef struct {
uint8_t field37_0x32; uint8_t field37_0x32;
uint8_t field38_0x33; uint8_t field38_0x33;
bool AUTO_KEYPAD_LOCK; // bool AUTO_KEYPAD_LOCK;
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750) #if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
ALARM_Mode_t ALARM_MODE; ALARM_Mode_t ALARM_MODE;
#endif #endif
POWER_OnDisplayMode_t POWER_ON_DISPLAY_MODE; // POWER_OnDisplayMode_t POWER_ON_DISPLAY_MODE;
ROGER_Mode_t ROGER; ROGER_Mode_t ROGER;
uint8_t REPEATER_TAIL_TONE_ELIMINATION; uint8_t REPEATER_TAIL_TONE_ELIMINATION;
uint8_t KEY_1_SHORT_PRESS_ACTION; // uint8_t KEY_1_SHORT_PRESS_ACTION;
uint8_t KEY_1_LONG_PRESS_ACTION; // uint8_t KEY_1_LONG_PRESS_ACTION;
uint8_t KEY_2_SHORT_PRESS_ACTION; // uint8_t KEY_2_SHORT_PRESS_ACTION;
uint8_t KEY_2_LONG_PRESS_ACTION; // uint8_t KEY_2_LONG_PRESS_ACTION;
uint8_t MIC_SENSITIVITY; uint8_t MIC_SENSITIVITY;
uint8_t MIC_SENSITIVITY_TUNING; uint8_t MIC_SENSITIVITY_TUNING;
uint8_t CHAN_1_CALL; uint8_t CHAN_1_CALL;
@ -243,8 +243,8 @@ typedef struct {
uint8_t field78_0x96; uint8_t field78_0x96;
uint8_t field79_0x97; uint8_t field79_0x97;
uint8_t KEY_M_LONG_PRESS_ACTION; // uint8_t KEY_M_LONG_PRESS_ACTION;
uint8_t BACKLIGHT_MIN; // uint8_t BACKLIGHT_MIN;
#ifdef ENABLE_BLMIN_TMP_OFF #ifdef ENABLE_BLMIN_TMP_OFF
BLMIN_STAT_t BACKLIGHT_MIN_STAT; BLMIN_STAT_t BACKLIGHT_MIN_STAT;
#endif #endif

View file

@ -60,7 +60,7 @@ const t_menu_item MenuList[] =
{/*"BatSav",*/ VOICE_ID_SAVE_MODE, MENU_SAVE ,}, // was "SAVE" {/*"BatSav",*/ VOICE_ID_SAVE_MODE, MENU_SAVE ,}, // was "SAVE"
{/*"Mic",*/ VOICE_ID_INVALID, MENU_MIC ,}, {/*"Mic",*/ VOICE_ID_INVALID, MENU_MIC ,},
{/*"ChDisp",*/ VOICE_ID_INVALID, MENU_MDF ,}, // was "MDF" {/*"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" {/*"BackLt",*/ VOICE_ID_INVALID, MENU_ABR ,}, // was "ABR"
{/*"BLMax",*/ VOICE_ID_INVALID, MENU_ABR_MAX ,}, {/*"BLMax",*/ VOICE_ID_INVALID, MENU_ABR_MAX ,},
{/*"Roger",*/ VOICE_ID_INVALID, MENU_ROGER ,}, {/*"Roger",*/ VOICE_ID_INVALID, MENU_ROGER ,},
@ -840,11 +840,11 @@ void UI_DisplayMenu(void) {
memmove(String, Contact, 8); memmove(String, Contact, 8);
break; break;
#endif #endif
case MENU_PONMSG: // case MENU_PONMSG:
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]); // strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
//
//
break; // break;
case MENU_ROGER: case MENU_ROGER:
strcpy(String, gSubMenu_ROGER[gSubMenuSelection]); strcpy(String, gSubMenu_ROGER[gSubMenuSelection]);

View file

@ -99,7 +99,7 @@ enum
#endif #endif
MENU_D_LIVE_DEC, MENU_D_LIVE_DEC,
MENU_PONMSG, // MENU_PONMSG,
MENU_ROGER, MENU_ROGER,
// MENU_VOL, // MENU_VOL,
//MENU_BAT_TXT, //MENU_BAT_TXT,

View file

@ -51,12 +51,7 @@ void UI_DisplayWelcome(void) {
memset(gStatusLine, 0, sizeof(gStatusLine)); memset(gStatusLine, 0, sizeof(gStatusLine));
memset(gFrameBuffer, 0, sizeof(gFrameBuffer)); 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) {
} }
}
} }