修复接收数据处理BUG
This commit is contained in:
parent
72ea368472
commit
e046637625
@ -95,6 +95,9 @@ unsigned int ADC_Average(unsigned int *buff, unsigned int num, unsigned int thre
|
|||||||
// new
|
// new
|
||||||
void OutPutCtrl(void);
|
void OutPutCtrl(void);
|
||||||
|
|
||||||
|
|
||||||
|
unsigned char code BUILD_DATA[] = __DATE__ ;
|
||||||
|
unsigned char code BUILD_TIME[] = __TIME__ ;
|
||||||
/***************变量定义**************/
|
/***************变量定义**************/
|
||||||
bit busy = 0;
|
bit busy = 0;
|
||||||
bit SendEN = 0;
|
bit SendEN = 0;
|
||||||
@ -421,7 +424,7 @@ void OutPutCtrl(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void (void)
|
void turnOFFOutput(void)
|
||||||
{
|
{
|
||||||
STOP_FLAG = 1;
|
STOP_FLAG = 1;
|
||||||
Shut_Hour = 0;
|
Shut_Hour = 0;
|
||||||
@ -1588,14 +1591,10 @@ void DataParsing(void)
|
|||||||
{
|
{
|
||||||
if (Uart1Ready_R == 1) // 数据接收完成,处理接收到的数据
|
if (Uart1Ready_R == 1) // 数据接收完成,处理接收到的数据
|
||||||
{
|
{
|
||||||
// 按键返回
|
|
||||||
if (Rxbuff[0] == 0x02)
|
if (Rxbuff[0] == 0x02)
|
||||||
{
|
{
|
||||||
// 参数复位
|
TargetCurrent = (Rxbuff[1] << 8) + Rxbuff[2];
|
||||||
TargetCurrent = Rxbuff[1] << 8 + Rxbuff[2];
|
|
||||||
// 参数掉电保存(直接调用函数)
|
|
||||||
Save_Flag = 1;
|
Save_Flag = 1;
|
||||||
// Parameter_Save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Uart1Ready_R = 0;
|
Uart1Ready_R = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user