From 3faf9baf670abf9470609b4f0dea840d5375f913 Mon Sep 17 00:00:00 2001 From: YuanHongbin <975559679@qq.com> Date: Wed, 20 May 2026 15:02:36 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=89=93?= =?UTF-8?q?=E5=BC=80=E6=BF=80=E5=85=89=E5=90=8E=E6=97=A0=E6=B3=95=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E7=9A=84bug=202=E3=80=81=E6=9C=AA=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E9=9C=80=E5=90=91=E7=BD=91=E5=85=B3=E5=8F=91?= =?UTF-8?q?=E9=80=81=E5=B7=B2=E6=89=93=E5=BC=80=E6=BF=80=E5=85=89=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=203=E3=80=81=E5=BC=80=E5=90=AF=E5=92=8C=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=BF=80=E5=85=89=E6=97=B6=E4=BC=9A=E5=90=91=E7=BD=91?= =?UTF-8?q?=E5=85=B3=E4=B8=8A=E6=8A=A5=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Module/LaserTracing_Debug | 2 +- source/inc/main.h | 2 -- source/src/SGCP.c | 8 ++++++-- source/src/main.c | 6 ------ 4 files changed, 7 insertions(+), 11 deletions(-) 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:{