diff --git a/Module/LaserTracing_Debug b/Module/LaserTracing_Debug index 03e1d00..5915837 160000 --- a/Module/LaserTracing_Debug +++ b/Module/LaserTracing_Debug @@ -1 +1 @@ -Subproject commit 03e1d001ef9f61e5b0bab0942fe242292f54108c +Subproject commit 5915837afb2c05479e8674f7184bb5bbdc315da9 diff --git a/source/inc/main.h b/source/inc/main.h index 6abd9c8..74de791 100644 --- a/source/inc/main.h +++ b/source/inc/main.h @@ -101,8 +101,6 @@ typedef struct { bool CaliFlag; //标校标志位 int16_t Nonce; //随机数 - - bool LaserFlag; }AppDetect_t; extern AppDetect_t App; diff --git a/source/src/SGCP.c b/source/src/SGCP.c index 2f196ec..77fb4d0 100644 --- a/source/src/SGCP.c +++ b/source/src/SGCP.c @@ -1821,12 +1821,16 @@ void GwRevLoopHandler(void) PrintfMess(); if(SGCP.LaserOnOff == true) { - ToGWLaserRes(SGCP.LaserOnOff); + LASER1_ON(); + if(SGCP.LoginOk == true) + ToGWLaserRes(SGCP.LaserOnOff); DBG_LOG("The laser has been activated!\r\n"); } else if(SGCP.LaserOnOff == false) { - ToGWLaserRes(SGCP.LaserOnOff); + LASER1_OFF(); + if(SGCP.LoginOk == true) + ToGWLaserRes(SGCP.LaserOnOff); DBG_LOG("The laser has been turned off!\r\n"); } SGCP.GWStatus = GW_STATUS_IDLE; diff --git a/source/src/main.c b/source/src/main.c index b4a719f..03efa3e 100644 --- a/source/src/main.c +++ b/source/src/main.c @@ -211,7 +211,6 @@ static void AppInit(void) App.AccRead_EndFlag = false; App.UpdateOk = false; App.CaliFlag = false; - App.LaserFlag = false; App.Status = APP_STATUS_ON; App.TD1mSDelayCnt = (App.Nonce % 2000) + 2000; @@ -383,11 +382,6 @@ static void AppLoopHandler(void) //App.Status = APP_STATUS_ACTION;//鎸佺画宸ヤ綔 App.Status = APP_STATUS_OFF; } - else if(App.LaserFlag == true) - { - App.LaserFlag = false; - LASER1_ON(); - } break;} case APP_STATUS_WAIT_LOGIN:{