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_SHOW_OP_ARG := 1
|
||||
ENABLE_MDC1200_SIDE_BEEP := 0
|
||||
ENABLE_MDC1200_CONRACT := 1
|
||||
|
||||
|
||||
# ---- DEBUGGING ----
|
||||
ENABLE_AM_FIX_SHOW_DATA := 0
|
||||
|
|
|
@ -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参数
|
||||
```
|
||||
|
|
|
@ -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
|
||||
|
|
23
ui/main.c
23
ui/main.c
|
@ -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,15 +749,20 @@ void UI_DisplayMain(void) {
|
|||
sprintf(String, "ID %04X", mdc1200_unit_id);
|
||||
print_col = 40;
|
||||
}
|
||||
|
||||
//#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
|
||||
|
||||
UI_PrintStringSmallBold(String, print_col, 0, 3);
|
||||
|
||||
#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
|
||||
|
||||
|
||||
} else
|
||||
#endif
|
||||
#ifdef ENABLE_AUDIO_BAR
|
||||
|
|
Loading…
Reference in a new issue