From 8bc96bdc7c466e990fa786c0ccb72f47ecae1285 Mon Sep 17 00:00:00 2001 From: wu58430 Date: Tue, 5 Dec 2023 09:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=99=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.c | 3 +-- app/uart.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/app.c b/app/app.c index 733d8bf..1b0e13c 100644 --- a/app/app.c +++ b/app/app.c @@ -1182,8 +1182,7 @@ void APP_TimeSlice10ms(void) if (gRxVfo->Modulation == MODULATION_AM && gSetting_AM_fix) AM_fix_10ms(gEeprom.RX_VFO); #endif - char a[2]="SB"; - UART_Send((uint8_t *)&a,2); + if (UART_IsCommandAvailable()) { char a[2]="OK"; diff --git a/app/uart.c b/app/uart.c index c6cbf9a..7c904fa 100644 --- a/app/uart.c +++ b/app/uart.c @@ -514,11 +514,9 @@ bool UART_IsCommandAvailable(void) return (CRC_Calculate(UART_Command.Buffer, Size) != CRC) ? false : true; } - void UART_HandleCommand(void) +void UART_HandleCommand(void) { -// volatile uint16_t CMD_ID= - - switch (UART_Command.Header.ID) + switch (UART_Command.Header.ID) { case 0x0514: CMD_0514(UART_Command.Buffer);