From 1b4876fa8c75d9a0f3ffbfdc515a59a776f9dd65 Mon Sep 17 00:00:00 2001
From: yincheng.zhong <634916154@qq.com>
Date: 星期五, 19 四月 2024 14:42:27 +0800
Subject: [PATCH] 增加数据上传秒延迟模式,增加远距离通道,测试网关通讯能力模式

---
 Src/main.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/Src/main.c b/Src/main.c
index 06270ad..3158932 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -306,7 +306,7 @@
 	hardware_pici = STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+2);
 	hardware_type = STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+4);
 	//deca_sleep(1000);
-	g_com_map[VERSION] = (1<<8)|13;
+	g_com_map[VERSION] = (1<<8)|14;
 //    g_com_map[DEV_ID]=1158;
 //    #ifdef DEBUG_MODE
 //   // g_com_map[GROUP_ID]=21;
@@ -596,16 +596,22 @@
 uint8_t GPS_Close_flag=1;
 uint8_t debugnum;
 uint8_t Lora_send_flag;
+extern uint8_t rec_secdelay;
 void Lora_Send_Poll(void)
 {
-        if(Lora_send_flag)
-        { 
-            debugnum++;
+    if(rec_secdelay>0)
+    {
+        rec_secdelay--;
+        return;
+    }
+    if(Lora_send_flag)
+    { 
+        debugnum++;
         Lora_send_flag=0;    
-            loraled=BLUE;
+        loraled=BLUE;
         LoraReportPoll();
         flag_onesecond = 1;
-        }
+    }
 
 }
 extern  volatile uint16_t rx_len ;  //接收一帧数据的长度

--
Gitblit v1.9.3