This commit is contained in:
wu58430 2023-12-04 17:34:47 +08:00
parent ee072c8e5c
commit 7d090a0e39
5 changed files with 19 additions and 17 deletions

View file

@ -22,10 +22,7 @@
<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$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/main.c" afterDir="false" /> <change beforePath="$PROJECT_DIR$/settings.h" beforeDir="false" afterPath="$PROJECT_DIR$/settings.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/misc.c" beforeDir="false" afterPath="$PROJECT_DIR$/misc.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/misc.h" beforeDir="false" afterPath="$PROJECT_DIR$/misc.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/radio.c" beforeDir="false" afterPath="$PROJECT_DIR$/radio.c" afterDir="false" />
</list> </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" />
@ -132,7 +129,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="2557000" /> <workItem from="1701678199532" duration="3759000" />
</task> </task>
<task id="LOCAL-00001" summary="bug fix"> <task id="LOCAL-00001" summary="bug fix">
<created>1701136012311</created> <created>1701136012311</created>
@ -344,7 +341,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1701678635953</updated> <updated>1701678635953</updated>
</task> </task>
<option name="localTasksCounter" value="31" /> <task id="LOCAL-00031" summary="MDC RX">
<created>1701681045853</created>
<option name="number" value="00031" />
<option name="presentableId" value="LOCAL-00031" />
<option name="project" value="LOCAL" />
<updated>1701681045853</updated>
</task>
<option name="localTasksCounter" value="32" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">

View file

@ -468,7 +468,6 @@ uint8_t mdc1200_rx_ready_tick_500ms;
void MDC1200_process_rx(const uint16_t interrupt_bits) void MDC1200_process_rx(const uint16_t interrupt_bits)
{ {
uint8_t a=0xAA;
const uint16_t rx_sync_flags = BK4819_ReadRegister(0x0B); const uint16_t rx_sync_flags = BK4819_ReadRegister(0x0B);
const uint16_t fsk_reg59 = BK4819_ReadRegister(0x59) & ~((1u << 15) | (1u << 14) | (1u << 12) | (1u << 11)); const uint16_t fsk_reg59 = BK4819_ReadRegister(0x59) & ~((1u << 15) | (1u << 14) | (1u << 12) | (1u << 11));
@ -481,7 +480,6 @@ void MDC1200_process_rx(const uint16_t interrupt_bits)
if (rx_sync) if (rx_sync)
{ {
a=0xAB;
mdc1200_rx_buffer_index = 0; mdc1200_rx_buffer_index = 0;
{ {
@ -500,7 +498,6 @@ void MDC1200_process_rx(const uint16_t interrupt_bits)
if (rx_fifo_almost_full) if (rx_fifo_almost_full)
{ {
a=0xAC;
unsigned int i; unsigned int i;
const unsigned int count = BK4819_ReadRegister(0x5E) & (7u << 0); // almost full threshold const unsigned int count = BK4819_ReadRegister(0x5E) & (7u << 0); // almost full threshold
@ -524,7 +521,6 @@ void MDC1200_process_rx(const uint16_t interrupt_bits)
{ {
BK4819_WriteRegister(0x59, (1u << 15) | (1u << 14) | fsk_reg59); BK4819_WriteRegister(0x59, (1u << 15) | (1u << 14) | fsk_reg59);
BK4819_WriteRegister(0x59, (1u << 12) | fsk_reg59); BK4819_WriteRegister(0x59, (1u << 12) | fsk_reg59);
a=0xAD;
if (MDC1200_process_rx_data( if (MDC1200_process_rx_data(
mdc1200_rx_buffer, mdc1200_rx_buffer,
@ -533,7 +529,6 @@ void MDC1200_process_rx(const uint16_t interrupt_bits)
&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 * 6; // 6 second MDC display time
a=0xAE;
gUpdateDisplay = true; gUpdateDisplay = true;
} }
@ -552,7 +547,6 @@ void MDC1200_process_rx(const uint16_t interrupt_bits)
} }
UART_Send((uint8_t *)&a,1);;
} }

View file

@ -217,8 +217,8 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
if(!DTMF_Reply()) { if(!DTMF_Reply()) {
#ifdef ENABLE_MDC1200 #ifdef ENABLE_MDC1200
// if (g_current_vfo->channel.mdc1200_mode == MDC1200_MODE_BOT || g_current_vfo->channel.mdc1200_mode == MDC1200_MODE_BOTH) // if (g_current_vfo->channel.mdc1200_mode == MDC1200_MODE_BOT || g_current_vfo->channel.mdc1200_mode == MDC1200_MODE_BOTH)
if(1) if(gEeprom.ROGER == ROGER_MODE_MDC_HEAD||gEeprom.ROGER==ROGER_MODE_MDC_BOTH||gEeprom.ROGER==ROGER_MODE_MDC_HEAD_ROGER)
{ {
SYSTEM_DelayMs(30); SYSTEM_DelayMs(30);

View file

@ -1126,10 +1126,10 @@ void RADIO_PrepareCssTX(void)
void RADIO_SendEndOfTransmission(void) void RADIO_SendEndOfTransmission(void)
{ {
if (gEeprom.ROGER == ROGER_MODE_ROGER) if (gEeprom.ROGER == ROGER_MODE_ROGER||gEeprom.ROGER==ROGER_MODE_MDC_HEAD_ROGER)
BK4819_PlayRoger(); BK4819_PlayRoger();
else else
if (gEeprom.ROGER == ROGER_MODE_MDC) { if (gEeprom.ROGER == ROGER_MODE_MDC_END||gEeprom.ROGER==ROGER_MODE_MDC_BOTH) {
BK4819_send_MDC1200(MDC1200_OP_CODE_POST_ID, 0x00, MDC_ID, false); BK4819_send_MDC1200(MDC1200_OP_CODE_POST_ID, 0x00, MDC_ID, false);
#ifdef ENABLE_MDC1200_SIDE_BEEP #ifdef ENABLE_MDC1200_SIDE_BEEP

View file

@ -115,7 +115,11 @@ typedef enum ALARM_Mode_t ALARM_Mode_t;
enum ROGER_Mode_t { enum ROGER_Mode_t {
ROGER_MODE_OFF = 0, ROGER_MODE_OFF = 0,
ROGER_MODE_ROGER, ROGER_MODE_ROGER,
ROGER_MODE_MDC ROGER_MODE_MDC_END,
ROGER_MODE_MDC_HEAD,
ROGER_MODE_MDC_BOTH,
ROGER_MODE_MDC_HEAD_ROGER
}; };
typedef enum ROGER_Mode_t ROGER_Mode_t; typedef enum ROGER_Mode_t ROGER_Mode_t;