mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
MDC RX
This commit is contained in:
parent
2a0dfa742e
commit
42e9c1d4e2
7 changed files with 49 additions and 12 deletions
|
@ -20,7 +20,15 @@
|
||||||
</configurations>
|
</configurations>
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="MDC RX" />
|
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="MDC RX">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/mdc1200.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/mdc1200.c" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/chinese.h" beforeDir="false" afterPath="$PROJECT_DIR$/chinese.h" 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/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/menu.c" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/ui/menu.h" beforeDir="false" afterPath="$PROJECT_DIR$/ui/menu.h" 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" />
|
||||||
|
@ -126,7 +134,7 @@
|
||||||
<workItem from="1701413653518" duration="3544000" />
|
<workItem from="1701413653518" duration="3544000" />
|
||||||
<workItem from="1701430185864" duration="10115000" />
|
<workItem from="1701430185864" duration="10115000" />
|
||||||
<workItem from="1701559895523" duration="22519000" />
|
<workItem from="1701559895523" duration="22519000" />
|
||||||
<workItem from="1701678199532" duration="4182000" />
|
<workItem from="1701678199532" duration="6176000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="bug fix">
|
<task id="LOCAL-00001" summary="bug fix">
|
||||||
<created>1701136012311</created>
|
<created>1701136012311</created>
|
||||||
|
@ -352,7 +360,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1701682489155</updated>
|
<updated>1701682489155</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="33" />
|
<task id="LOCAL-00033" summary="MDC RX">
|
||||||
|
<created>1701682811016</created>
|
||||||
|
<option name="number" value="00033" />
|
||||||
|
<option name="presentableId" value="LOCAL-00033" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1701682811016</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="34" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
|
|
@ -528,7 +528,7 @@ void MDC1200_process_rx(const uint16_t interrupt_bits)
|
||||||
&mdc1200_op,
|
&mdc1200_op,
|
||||||
&mdc1200_arg,
|
&mdc1200_arg,
|
||||||
&mdc1200_unit_id)) {
|
&mdc1200_unit_id)) {
|
||||||
mdc1200_rx_ready_tick_500ms = 2 * 6; // 6 second MDC display time
|
mdc1200_rx_ready_tick_500ms = 2 * 3; // 6 second MDC display time
|
||||||
gUpdateDisplay = true;
|
gUpdateDisplay = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#define 信道显示模式 "\x1C\x1D\x93\x94\x0C\x89"
|
#define 信道显示模式 "\x1C\x1D\x93\x94\x0C\x89"
|
||||||
#define 自动背光 "\x95\x96\x97\x98"
|
#define 自动背光 "\x95\x96\x97\x98"
|
||||||
#define 背光亮度 "\x97\x98\x99\x9A"
|
#define 背光亮度 "\x97\x98\x99\x9A"
|
||||||
#define 发送结束音 "\x9B\x9C\x0B"
|
#define 首尾音 "\x9B\x9C\x0B"
|
||||||
#define MDC_ID "\x4D\x44\x43\x20\x49\x44"
|
#define MDC_ID "\x4D\x44\x43\x20\x49\x44"
|
||||||
#define 尾音消除 "\x9C\x0B\x9D\x1F"
|
#define 尾音消除 "\x9C\x0B\x9D\x1F"
|
||||||
#define 过中继尾音消除 "\x9E\x9F\xA0\x9C\x0B\x9D\x1F"
|
#define 过中继尾音消除 "\x9E\x9F\xA0\x9C\x0B\x9D\x1F"
|
||||||
|
|
17
settings.c
17
settings.c
|
@ -118,8 +118,8 @@ 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_1_SHORT_PRESS_ACTION = (Data[1] < ACTION_OPT_LEN) ? Data[1] : ACTION_OPT_MONITOR;
|
gEeprom.MDC1200_ID =((uint16_t) (Data[2] << 8))|((uint16_t)(Data[1] ));
|
||||||
// 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;
|
||||||
|
@ -505,9 +505,16 @@ void SETTINGS_SaveSettings(void)
|
||||||
EEPROM_WriteBuffer(0x0E78, State);
|
EEPROM_WriteBuffer(0x0E78, State);
|
||||||
|
|
||||||
State[0] = gEeprom.BEEP_CONTROL;
|
State[0] = gEeprom.BEEP_CONTROL;
|
||||||
State[0] |= 0;//gEeprom.KEY_M_LONG_PRESS_ACTION << 1;
|
// State[0] |= 0;//gEeprom.KEY_M_LONG_PRESS_ACTION << 1;
|
||||||
State[1] = 0;//gEeprom.KEY_1_SHORT_PRESS_ACTION;
|
// State[1]=(uint8_t)(gEeprom.MDC1200_ID&(0x000000ff));
|
||||||
State[2] = 0;//gEeprom.KEY_1_LONG_PRESS_ACTION;
|
// State[2]=(uint8_t)((gEeprom.MDC1200_ID&0x0000ff00)>>8);
|
||||||
|
// State[3]=(uint8_t)((gEeprom.MDC1200_ID&0x00ff0000)>>16);
|
||||||
|
// State[4]=(uint8_t)((gEeprom.MDC1200_ID&0xff000000)>>24);
|
||||||
|
State[1]=(uint8_t)(gEeprom.MDC1200_ID&(0x00ff));
|
||||||
|
State[2]=(uint8_t)((gEeprom.MDC1200_ID&(0xff00))>>8);
|
||||||
|
|
||||||
|
// 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[3] = 0;//gEeprom.KEY_2_SHORT_PRESS_ACTION;
|
||||||
State[4] = 0;//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;
|
||||||
|
|
|
@ -254,6 +254,7 @@ typedef struct {
|
||||||
#endif
|
#endif
|
||||||
uint8_t BACKLIGHT_MAX;
|
uint8_t BACKLIGHT_MAX;
|
||||||
BATTERY_Type_t BATTERY_TYPE;
|
BATTERY_Type_t BATTERY_TYPE;
|
||||||
|
uint32_t MDC1200_ID;
|
||||||
} EEPROM_Config_t;
|
} EEPROM_Config_t;
|
||||||
|
|
||||||
extern EEPROM_Config_t gEeprom;
|
extern EEPROM_Config_t gEeprom;
|
||||||
|
|
14
ui/menu.c
14
ui/menu.c
|
@ -63,7 +63,10 @@ const t_menu_item MenuList[] =
|
||||||
// {/*"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 ,发送结束音},
|
{/*"MDCID",*/ VOICE_ID_INVALID, MENU_MDC_ID ,MDC_ID},
|
||||||
|
|
||||||
|
{/*"Roger",*/ VOICE_ID_INVALID, MENU_ROGER ,首尾音},
|
||||||
|
|
||||||
{/*"STE",*/ VOICE_ID_INVALID, MENU_STE ,尾音消除},
|
{/*"STE",*/ VOICE_ID_INVALID, MENU_STE ,尾音消除},
|
||||||
{/*"RP STE",*/ VOICE_ID_INVALID, MENU_RP_STE ,过中继尾音消除},
|
{/*"RP STE",*/ VOICE_ID_INVALID, MENU_RP_STE ,过中继尾音消除},
|
||||||
{/*"1 Call",*/ VOICE_ID_INVALID, MENU_1_CALL ,按键即呼},
|
{/*"1 Call",*/ VOICE_ID_INVALID, MENU_1_CALL ,按键即呼},
|
||||||
|
@ -797,10 +800,17 @@ void UI_DisplayMenu(void) {
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_DTMF_CALLING
|
#ifdef ENABLE_DTMF_CALLING
|
||||||
case MENU_ANI_ID:
|
case MENU_ANI_ID:
|
||||||
|
|
||||||
strcpy(String, gEeprom.ANI_DTMF_ID);
|
strcpy(String, gEeprom.ANI_DTMF_ID);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_MDC1200
|
||||||
|
case MENU_MDC_ID:
|
||||||
|
/// char mdc_id_str[4];
|
||||||
|
sprintf(String, "%04X", gEeprom.MDC1200_ID); // %04X确保输出是4个字符长度的十六进制数
|
||||||
|
// strcpy(String, id);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case MENU_UPCODE:
|
case MENU_UPCODE:
|
||||||
strcpy(String, gEeprom.DTMF_UP_CODE);
|
strcpy(String, gEeprom.DTMF_UP_CODE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -82,6 +82,10 @@ enum
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_DTMF_CALLING
|
#ifdef ENABLE_DTMF_CALLING
|
||||||
MENU_ANI_ID,
|
MENU_ANI_ID,
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_MDC1200
|
||||||
|
MENU_MDC_ID,
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
MENU_UPCODE,
|
MENU_UPCODE,
|
||||||
MENU_DWCODE,
|
MENU_DWCODE,
|
||||||
|
|
Loading…
Reference in a new issue