From 7337e9b612f3d2709294a8f905a00539918f9674 Mon Sep 17 00:00:00 2001
From: chen <15335560115@163.com>
Date: 星期四, 12 九月 2024 09:20:20 +0800
Subject: [PATCH] 关闭1h,打开1分钟后上传GPS数据

---
 keil/uwb_app.c |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/keil/uwb_app.c b/keil/uwb_app.c
index fadacac..ae440f3 100644
--- a/keil/uwb_app.c
+++ b/keil/uwb_app.c
@@ -380,7 +380,9 @@
     range_success = 0;
     receive_flag = 0;
     temp_count3=phy_timer_count_get();
-//    gpio_pin_set(SCL_PIN);
+		#ifdef DEBUG_BOXING
+    gpio_pin_set(SCL_PIN);
+		#endif
     uwb_rx(0, 0, RX_SYNC_WIN_US);//开启接收
     temp_count2=phy_timer_count_get();
     start_receive_count=phy_timer_count_get();
@@ -440,8 +442,9 @@
                 }
                 range_success = 1;
                 sleep_timer_start(__MS_TO_32K_CNT(uwb_timer_reload_value));//测试
-                
-               //  gpio_pin_clr(SCL_PIN);
+                #ifdef DEBUG_BOXING
+                 gpio_pin_clr(SCL_PIN);
+								#endif
                 delay_time = (current_count-start_receive_count)>>7;
                 
                 LOG_INFO(TRACE_MODULE_APP,"标签ID:%X,距离: %d 信号强度:%d. 等待时间%d\r\n",g_com_map[BIND_DEV_ID],distance,rssi,delay_time);
@@ -498,7 +501,9 @@
     mac_register_process_handler(tx_int_callback, rx_int_callback);
     receive_flag = 0;
     temp_count3=phy_timer_count_get();
-//    gpio_pin_set(SCL_PIN);
+		#ifdef DEBUG_BOXING
+    gpio_pin_set(SCL_PIN);
+		#endif
     uwb_rx(0, 0, RX_SYNC_WIN_US_TEMP);//开启接收
     start_receive_count=phy_timer_count_get();
     poll_timeout=US_TO_PHY_TIMER_COUNT(2000000);//多一个多0.4ms默认0.4ms计算为0.125*4*100000,默认开启1mss
@@ -556,7 +561,9 @@
                     Anchor_RecNearPoll(i);
                 }
                 sleep_timer_start(__MS_TO_32K_CNT(UWB_DELAY_TIME_US));//测试
-//                gpio_pin_clr(SCL_PIN);//测试
+								#ifdef DEBUG_BOXING
+                gpio_pin_clr(SCL_PIN);//测试
+								#endif
                 return 1;//返回发送成功标志
             }
 
@@ -566,7 +573,9 @@
 
     }
     // LOG_INFO(TRACE_MODULE_APP,"超时定时器:%x,%x,%x\r\n",start_receive_count,end_receive_count,current_count);
-//    gpio_pin_clr(SCL_PIN);//测试
+		#ifdef DEBUG_BOXING
+    gpio_pin_clr(SCL_PIN);//测试
+		#endif
     return 0;//返回绑定失败标志
 }
 //}

--
Gitblit v1.9.3