diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 68f3128..643f9fb 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -20,7 +20,15 @@ - + + + + + + + + + diff --git a/app/mdc1200.c b/app/mdc1200.c index 5baa272..a1f972d 100644 --- a/app/mdc1200.c +++ b/app/mdc1200.c @@ -528,7 +528,7 @@ void MDC1200_process_rx(const uint16_t interrupt_bits) &mdc1200_op, &mdc1200_arg, &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; } diff --git a/chinese.h b/chinese.h index df5e6b9..7580d72 100644 --- a/chinese.h +++ b/chinese.h @@ -28,7 +28,7 @@ #define 信道显示模式 "\x1C\x1D\x93\x94\x0C\x89" #define 自动背光 "\x95\x96\x97\x98" #define 背光亮度 "\x97\x98\x99\x9A" -#define 发送结束音 "\x9B\x9C\x0B" +#define 首尾音 "\x9B\x9C\x0B" #define MDC_ID "\x4D\x44\x43\x20\x49\x44" #define 尾音消除 "\x9C\x0B\x9D\x1F" #define 过中继尾音消除 "\x9E\x9F\xA0\x9C\x0B\x9D\x1F" diff --git a/settings.c b/settings.c index db75f63..cb78c8b 100644 --- a/settings.c +++ b/settings.c @@ -118,8 +118,8 @@ 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.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_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; @@ -505,9 +505,16 @@ void SETTINGS_SaveSettings(void) EEPROM_WriteBuffer(0x0E78, State); State[0] = gEeprom.BEEP_CONTROL; - 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[0] |= 0;//gEeprom.KEY_M_LONG_PRESS_ACTION << 1; +// State[1]=(uint8_t)(gEeprom.MDC1200_ID&(0x000000ff)); +// 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[4] = 0;//gEeprom.KEY_2_LONG_PRESS_ACTION; State[5] = //gEeprom.SCAN_RESUME_MODE; diff --git a/settings.h b/settings.h index 1571804..95bf45c 100644 --- a/settings.h +++ b/settings.h @@ -254,6 +254,7 @@ typedef struct { #endif uint8_t BACKLIGHT_MAX; BATTERY_Type_t BATTERY_TYPE; + uint32_t MDC1200_ID; } EEPROM_Config_t; extern EEPROM_Config_t gEeprom; diff --git a/ui/menu.c b/ui/menu.c index 49d6f6d..e5ab9bb 100644 --- a/ui/menu.c +++ b/ui/menu.c @@ -63,7 +63,10 @@ const t_menu_item MenuList[] = // {/*"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 ,发送结束音}, + {/*"MDCID",*/ VOICE_ID_INVALID, MENU_MDC_ID ,MDC_ID}, + + {/*"Roger",*/ VOICE_ID_INVALID, MENU_ROGER ,首尾音}, + {/*"STE",*/ VOICE_ID_INVALID, MENU_STE ,尾音消除}, {/*"RP STE",*/ VOICE_ID_INVALID, MENU_RP_STE ,过中继尾音消除}, {/*"1 Call",*/ VOICE_ID_INVALID, MENU_1_CALL ,按键即呼}, @@ -797,10 +800,17 @@ void UI_DisplayMenu(void) { #endif #ifdef ENABLE_DTMF_CALLING case MENU_ANI_ID: + strcpy(String, gEeprom.ANI_DTMF_ID); break; #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: strcpy(String, gEeprom.DTMF_UP_CODE); break; diff --git a/ui/menu.h b/ui/menu.h index 7363804..0b8cecb 100644 --- a/ui/menu.h +++ b/ui/menu.h @@ -82,6 +82,10 @@ enum #endif #ifdef ENABLE_DTMF_CALLING MENU_ANI_ID, +#endif +#ifdef ENABLE_MDC1200 + MENU_MDC_ID, + #endif MENU_UPCODE, MENU_DWCODE,