添加MDC联系人编译选项

This commit is contained in:
wu58430 2023-12-10 13:15:57 +08:00
parent 68da7f94a3
commit cccc093578
4 changed files with 40 additions and 29 deletions

View file

@ -48,6 +48,8 @@ ENABLE_SCAN_RANGES := 1
ENABLE_MDC1200 := 1
ENABLE_MDC1200_SHOW_OP_ARG := 1
ENABLE_MDC1200_SIDE_BEEP := 0
ENABLE_MDC1200_CONRACT := 1
# ---- DEBUGGING ----
ENABLE_AM_FIX_SHOW_DATA := 0

View file

@ -117,6 +117,7 @@ ENABLE_SCAN_RANGES := 1 扫描范围
ENABLE_MDC1200 := 1 MDC1200发送功能
ENABLE_MDC1200_SHOW_OP_ARG := 1 MDC显示首尾音参数
ENABLE_MDC1200_SIDE_BEEP := 0 MDC侧音
ENABLE_MDC1200_CONRACT := 1 MDC联系人开启后ENABLE_MDC1200_SHOW_OP_ARG失效
ENABLE_AM_FIX_SHOW_DATA := 0 显示 AM 修复的调试数据(仍在调整)
ENABLE_AGC_SHOW_DATA := 0 显示ACG参数
```

View file

@ -533,6 +533,7 @@ uint16_t extractHex(const char *str) {
}
return result;
}
#ifdef ENABLE_MDC1200_CONRACT
uint8_t contact_num=0;
uint16_t MDC_ADD[4] = {0x1D48, 0x1D88, 0x1DC8,0x1F08};
void mdc1200_update_contact_num()
@ -583,4 +584,4 @@ bool mdc1200_contact_find(uint16_t mdc_id, char *contact) {
// UART_Send(A,64);
// EEPROM_ReadBuffer(MDC_ADD4, A, sizeof(A));
// UART_Send(A,64);
#endif

View file

@ -734,9 +734,11 @@ void UI_DisplayMain(void) {
#ifdef ENABLE_MDC1200
if (mdc1200_rx_ready_tick_500ms > 0) {
char mdc1200_contact[14];
center_line = CENTER_LINE_MDC1200;
#ifdef ENABLE_MDC1200_CONTACT
uint8_t print_col = 0;
char mdc1200_contact[14];
if (mdc1200_contact_find(mdc1200_unit_id, mdc1200_contact))//
{
@ -747,48 +749,53 @@ void UI_DisplayMain(void) {
sprintf(String, "ID %04X", mdc1200_unit_id);
print_col = 40;
}
UI_PrintStringSmallBold(String, print_col, 0, 3);
//#ifdef ENABLE_MDC1200_SHOW_OP_ARG
// sprintf(String, "MDC1200 %02X %02X %04X", mdc1200_op, mdc1200_arg, mdc1200_unit_id);
//#else
// sprintf(String, "MDC1200 ID %04X", mdc1200_unit_id);
//#endif
#elifdef ENABLE_MDC1200_SHOW_OP_ARG
sprintf(String, "MDC1200 %02X %02X %04X", mdc1200_op, mdc1200_arg, mdc1200_unit_id);
UI_PrintStringSmallBold(String, 4, 0, 3);
#else
sprintf(String, "MDC1200 ID %04X", mdc1200_unit_id);
UI_PrintStringSmallBold(String, 4, 0, 3);
#endif
UI_PrintStringSmallBold(String, print_col, 0, 3);
} else
#endif
#ifdef ENABLE_AUDIO_BAR
if (gCurrentFunction == FUNCTION_TRANSMIT) {
center_line = CENTER_LINE_AUDIO_BAR;
UI_DisplayAudioBar();
}
else
if (gCurrentFunction == FUNCTION_TRANSMIT) {
center_line = CENTER_LINE_AUDIO_BAR;
UI_DisplayAudioBar();
}
else
#endif
#if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA)
if (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].Modulation == MODULATION_AM && gSetting_AM_fix)
{
if (gScreenToDisplay != DISPLAY_MAIN
if (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].Modulation == MODULATION_AM && gSetting_AM_fix)
{
if (gScreenToDisplay != DISPLAY_MAIN
#ifdef ENABLE_DTMF_CALLING
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
#endif
)
return;
)
return;
center_line = CENTER_LINE_AM_FIX_DATA;
AM_fix_print_data(gEeprom.RX_VFO, String);
UI_PrintStringSmall(String, 2, 0, 3);
}
else
center_line = CENTER_LINE_AM_FIX_DATA;
AM_fix_print_data(gEeprom.RX_VFO, String);
UI_PrintStringSmall(String, 2, 0, 3);
}
else
#endif
#ifdef ENABLE_RSSI_BAR
if (rx) {
center_line = CENTER_LINE_RSSI;
DisplayRSSIBar(false);
}
else
if (rx) {
center_line = CENTER_LINE_RSSI;
DisplayRSSIBar(false);
}
else
#endif
if (rx || gCurrentFunction == FUNCTION_FOREGROUND || gCurrentFunction == FUNCTION_POWER_SAVE) {