1、修复了打开激光后无法保持的bug

2、未注册时无需向网关发送已打开激光指令
3、开启和关闭激光时会向网关上报状态
This commit is contained in:
2026-05-20 15:02:36 +08:00
parent 2efab2862f
commit 3faf9baf67
4 changed files with 7 additions and 11 deletions
-2
View File
@@ -101,8 +101,6 @@ typedef struct {
bool CaliFlag; //标校标志位
int16_t Nonce; //随机数
bool LaserFlag;
}AppDetect_t;
extern AppDetect_t App;
+4
View File
@@ -1821,11 +1821,15 @@ void GwRevLoopHandler(void)
PrintfMess();
if(SGCP.LaserOnOff == true)
{
LASER1_ON();
if(SGCP.LoginOk == true)
ToGWLaserRes(SGCP.LaserOnOff);
DBG_LOG("The laser has been activated!\r\n");
}
else if(SGCP.LaserOnOff == false)
{
LASER1_OFF();
if(SGCP.LoginOk == true)
ToGWLaserRes(SGCP.LaserOnOff);
DBG_LOG("The laser has been turned off!\r\n");
}
-6
View File
@@ -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:{