refactor: LaserTimerMinutes校验前移并增加范围检查,移除文件BOM冗余
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include <string.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
@@ -15,7 +15,7 @@
|
||||
#define DEBUG_CMD_CNT 16
|
||||
const DBGFunType DebugFun[DEBUG_CMD_CNT];
|
||||
|
||||
volatile DebugChannel_e gDebugChannel = DBG_CH_RS485_1;
|
||||
volatile DebugChannel_e gDebugChannel = DBG_CH_RS485_1;//上电默认调试口
|
||||
|
||||
static char buff[DEBUG_BUFSIZE];
|
||||
volatile uint16_t iw=0; /* buffer write index*/
|
||||
|
||||
+5
-4
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Include files
|
||||
******************************************************************************/
|
||||
@@ -157,6 +157,10 @@ static void AppInit(void)
|
||||
if(App.Para.Layout.ERTime > 240 || App.Para.Layout.ERTime < 20) {
|
||||
App.Para.Layout.ERTime = 40;
|
||||
}
|
||||
if(App.Para.LaserTimerMinutes < 0 || App.Para.LaserTimerMinutes > 240)
|
||||
App.Para.LaserTimerMinutes = 10;
|
||||
SGCP.LaserTimerMinutes = App.Para.LaserTimerMinutes;
|
||||
|
||||
SAVE_APP_PARA((uint32_t *)&App.Para);
|
||||
|
||||
LpUart0Init(App.Para.Rs485Ch1.BaudRate);//低功耗串口初始化
|
||||
@@ -196,9 +200,6 @@ static void AppInit(void)
|
||||
App.Login_LPTimer0 = true;
|
||||
//LPTimer0_ON((App.Nonce % 1200) + 300);//定时30s+随机2分钟,最小间隙100ms
|
||||
LPTimer0_ON(50);//5秒后注册
|
||||
if(App.Para.LaserTimerMinutes == 0)
|
||||
App.Para.LaserTimerMinutes = 10;
|
||||
SGCP.LaserTimerMinutes = App.Para.LaserTimerMinutes;
|
||||
App.UploadFlag = false;
|
||||
App.Upload_LPTimer0 = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user