mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
添加MDC联系人编译选项
This commit is contained in:
parent
68da7f94a3
commit
cccc093578
4 changed files with 40 additions and 29 deletions
2
Makefile
2
Makefile
|
@ -48,6 +48,8 @@ ENABLE_SCAN_RANGES := 1
|
||||||
ENABLE_MDC1200 := 1
|
ENABLE_MDC1200 := 1
|
||||||
ENABLE_MDC1200_SHOW_OP_ARG := 1
|
ENABLE_MDC1200_SHOW_OP_ARG := 1
|
||||||
ENABLE_MDC1200_SIDE_BEEP := 0
|
ENABLE_MDC1200_SIDE_BEEP := 0
|
||||||
|
ENABLE_MDC1200_CONRACT := 1
|
||||||
|
|
||||||
|
|
||||||
# ---- DEBUGGING ----
|
# ---- DEBUGGING ----
|
||||||
ENABLE_AM_FIX_SHOW_DATA := 0
|
ENABLE_AM_FIX_SHOW_DATA := 0
|
||||||
|
|
|
@ -117,6 +117,7 @@ ENABLE_SCAN_RANGES := 1 扫描范围
|
||||||
ENABLE_MDC1200 := 1 MDC1200发送功能
|
ENABLE_MDC1200 := 1 MDC1200发送功能
|
||||||
ENABLE_MDC1200_SHOW_OP_ARG := 1 MDC显示首尾音参数
|
ENABLE_MDC1200_SHOW_OP_ARG := 1 MDC显示首尾音参数
|
||||||
ENABLE_MDC1200_SIDE_BEEP := 0 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_AM_FIX_SHOW_DATA := 0 显示 AM 修复的调试数据(仍在调整)
|
||||||
ENABLE_AGC_SHOW_DATA := 0 显示ACG参数
|
ENABLE_AGC_SHOW_DATA := 0 显示ACG参数
|
||||||
```
|
```
|
||||||
|
|
|
@ -533,6 +533,7 @@ uint16_t extractHex(const char *str) {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_MDC1200_CONRACT
|
||||||
uint8_t contact_num=0;
|
uint8_t contact_num=0;
|
||||||
uint16_t MDC_ADD[4] = {0x1D48, 0x1D88, 0x1DC8,0x1F08};
|
uint16_t MDC_ADD[4] = {0x1D48, 0x1D88, 0x1DC8,0x1F08};
|
||||||
void mdc1200_update_contact_num()
|
void mdc1200_update_contact_num()
|
||||||
|
@ -583,4 +584,4 @@ bool mdc1200_contact_find(uint16_t mdc_id, char *contact) {
|
||||||
// UART_Send(A,64);
|
// UART_Send(A,64);
|
||||||
// EEPROM_ReadBuffer(MDC_ADD4, A, sizeof(A));
|
// EEPROM_ReadBuffer(MDC_ADD4, A, sizeof(A));
|
||||||
// UART_Send(A,64);
|
// UART_Send(A,64);
|
||||||
|
#endif
|
||||||
|
|
63
ui/main.c
63
ui/main.c
|
@ -734,9 +734,11 @@ void UI_DisplayMain(void) {
|
||||||
#ifdef ENABLE_MDC1200
|
#ifdef ENABLE_MDC1200
|
||||||
|
|
||||||
if (mdc1200_rx_ready_tick_500ms > 0) {
|
if (mdc1200_rx_ready_tick_500ms > 0) {
|
||||||
char mdc1200_contact[14];
|
|
||||||
center_line = CENTER_LINE_MDC1200;
|
center_line = CENTER_LINE_MDC1200;
|
||||||
|
#ifdef ENABLE_MDC1200_CONTACT
|
||||||
uint8_t print_col = 0;
|
uint8_t print_col = 0;
|
||||||
|
char mdc1200_contact[14];
|
||||||
|
|
||||||
if (mdc1200_contact_find(mdc1200_unit_id, mdc1200_contact))//
|
if (mdc1200_contact_find(mdc1200_unit_id, mdc1200_contact))//
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -747,48 +749,53 @@ void UI_DisplayMain(void) {
|
||||||
sprintf(String, "ID %04X", mdc1200_unit_id);
|
sprintf(String, "ID %04X", mdc1200_unit_id);
|
||||||
print_col = 40;
|
print_col = 40;
|
||||||
}
|
}
|
||||||
|
UI_PrintStringSmallBold(String, print_col, 0, 3);
|
||||||
|
|
||||||
//#ifdef ENABLE_MDC1200_SHOW_OP_ARG
|
#elifdef ENABLE_MDC1200_SHOW_OP_ARG
|
||||||
// sprintf(String, "MDC1200 %02X %02X %04X", mdc1200_op, mdc1200_arg, mdc1200_unit_id);
|
sprintf(String, "MDC1200 %02X %02X %04X", mdc1200_op, mdc1200_arg, mdc1200_unit_id);
|
||||||
//#else
|
UI_PrintStringSmallBold(String, 4, 0, 3);
|
||||||
// sprintf(String, "MDC1200 ID %04X", mdc1200_unit_id);
|
|
||||||
//#endif
|
#else
|
||||||
|
sprintf(String, "MDC1200 ID %04X", mdc1200_unit_id);
|
||||||
|
UI_PrintStringSmallBold(String, 4, 0, 3);
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
UI_PrintStringSmallBold(String, print_col, 0, 3);
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_AUDIO_BAR
|
#ifdef ENABLE_AUDIO_BAR
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT) {
|
if (gCurrentFunction == FUNCTION_TRANSMIT) {
|
||||||
center_line = CENTER_LINE_AUDIO_BAR;
|
center_line = CENTER_LINE_AUDIO_BAR;
|
||||||
UI_DisplayAudioBar();
|
UI_DisplayAudioBar();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA)
|
#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 (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].Modulation == MODULATION_AM && gSetting_AM_fix)
|
||||||
{
|
{
|
||||||
if (gScreenToDisplay != DISPLAY_MAIN
|
if (gScreenToDisplay != DISPLAY_MAIN
|
||||||
#ifdef ENABLE_DTMF_CALLING
|
#ifdef ENABLE_DTMF_CALLING
|
||||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
center_line = CENTER_LINE_AM_FIX_DATA;
|
center_line = CENTER_LINE_AM_FIX_DATA;
|
||||||
AM_fix_print_data(gEeprom.RX_VFO, String);
|
AM_fix_print_data(gEeprom.RX_VFO, String);
|
||||||
UI_PrintStringSmall(String, 2, 0, 3);
|
UI_PrintStringSmall(String, 2, 0, 3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_RSSI_BAR
|
#ifdef ENABLE_RSSI_BAR
|
||||||
if (rx) {
|
if (rx) {
|
||||||
center_line = CENTER_LINE_RSSI;
|
center_line = CENTER_LINE_RSSI;
|
||||||
DisplayRSSIBar(false);
|
DisplayRSSIBar(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (rx || gCurrentFunction == FUNCTION_FOREGROUND || gCurrentFunction == FUNCTION_POWER_SAVE) {
|
if (rx || gCurrentFunction == FUNCTION_FOREGROUND || gCurrentFunction == FUNCTION_POWER_SAVE) {
|
||||||
|
|
Loading…
Reference in a new issue