diff --git a/Module/LaserTracing_Debug/UartDebug.c b/Module/LaserTracing_Debug/UartDebug.c index 7c30199..6df5696 100644 --- a/Module/LaserTracing_Debug/UartDebug.c +++ b/Module/LaserTracing_Debug/UartDebug.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -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*/ diff --git a/source/src/main.c b/source/src/main.c index 613e238..1c46210 100644 --- a/source/src/main.c +++ b/source/src/main.c @@ -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;