From 5f2e20f7984c0f09a9c2721b63381a1a17536ed1 Mon Sep 17 00:00:00 2001
From: chen <15335560115@163.com>
Date: 星期四, 09 一月 2025 17:55:19 +0800
Subject: [PATCH] 手环V1.6,增加心跳包功能逻辑,增加第一次30sgps开启逻辑

---
 keil/include/src/gps.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/keil/include/src/gps.c b/keil/include/src/gps.c
index 812d86f..64a424d 100644
--- a/keil/include/src/gps.c
+++ b/keil/include/src/gps.c
@@ -9,7 +9,7 @@
 extern uint8_t flag_first_TCPconnect;
 extern uint16_t gps_wait_count2;
 uint16_t g_spsum,g_snum,ave_sp;
-uint8_t gps_power_state,gps_uwb_flag,gps_4g_flag,gps_timeout_flag,gps_need_data_flag = 1,gps_open_flag;
+uint8_t gps_power_state,gps_uwb_flag,gps_4g_flag,gps_timeout_flag,gps_need_data_flag = 1,gps_open_flag,gps_first_flag=1;
 void GPS_Poll(void)
 {
 
@@ -82,7 +82,10 @@
 							gps_power_state = 1;  //打开GPS电源
 						 
 							gps_wait_count++;
+							if(gps_wait_count>34)
+								gps_first_flag=0;//新加入第一次开启
 							if(gps_wait_count>=GPS_OPEN_TIME_OUT) { //超时切换工作状态
+								
 									gps_timeout_flag=1;//串口添加改变timeout逻辑
 									gps_wait_count=0;
 									gps_need_data_flag=0;//切换为关闭模式

--
Gitblit v1.9.3