修复接收数据处理BUG

This commit is contained in:
sunbeam0529 2025-07-08 09:10:07 +08:00
parent 72ea368472
commit e046637625

View File

@ -95,6 +95,9 @@ unsigned int ADC_Average(unsigned int *buff, unsigned int num, unsigned int thre
// new
void OutPutCtrl(void);
unsigned char code BUILD_DATA[] = __DATE__ ;
unsigned char code BUILD_TIME[] = __TIME__ ;
/***************变量定义**************/
bit busy = 0;
bit SendEN = 0;
@ -421,7 +424,7 @@ void OutPutCtrl(void)
}
}
void (void)
void turnOFFOutput(void)
{
STOP_FLAG = 1;
Shut_Hour = 0;
@ -1588,14 +1591,10 @@ void DataParsing(void)
{
if (Uart1Ready_R == 1) // 数据接收完成,处理接收到的数据
{
// 按键返回
if (Rxbuff[0] == 0x02)
{
// 参数复位
TargetCurrent = Rxbuff[1] << 8 + Rxbuff[2];
// 参数掉电保存(直接调用函数)
TargetCurrent = (Rxbuff[1] << 8) + Rxbuff[2];
Save_Flag = 1;
// Parameter_Save();
}
}
Uart1Ready_R = 0;