From 5f233123900cccf931ee970202c12ccdecc85377 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期二, 12 三月 2024 09:50:43 +0800 Subject: [PATCH] 版本2.7 修改灯的逻辑,充电时设备不再进入静止休眠状态,不再发射uwb lora 运行gps --- APL/APL.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/APL/APL.c b/APL/APL.c index 25e7e01..30aea77 100644 --- a/APL/APL.c +++ b/APL/APL.c @@ -292,11 +292,12 @@ return HIDO_OK; } -static uint8_t Input_5V_flag=0; +uint8_t Input_5V_flag=0; void Input_5V_Poll (void) { - if(IsTypecCActive() == HIDO_TRUE&&Input_5V_flag==0) + if(IsTypecCActive() == HIDO_TRUE/*&&Input_5V_flag==0*/) { Input_5V_flag=1; + nomove_time=0; if(bat_percent>=90) { powerled=GREEN; @@ -355,7 +356,7 @@ IdleTask(); GPS_Poll();//gps接收函数 Lora_Poll();//lora接收函数 - if(nomove_flag==0) + if(nomove_flag==0&&Input_5V_flag==0) { Lora_Sendfinalbag_Poll();//lora在gps成功获得位置坐标或者超过1分钟没有获得时发送gps最后一包数据的函数,之后1分钟(10s)发一次,除非lora收到消除标志位或者发送超过10次 } @@ -374,7 +375,7 @@ else { } -if(nomove_flag==0&&(Lora_IsIdle() == HIDO_TRUE)) +if(nomove_flag==0&&(Lora_IsIdle() == HIDO_TRUE)&&Input_5V_flag==0) { if(GPS_ON_flag) { -- Gitblit v1.9.3