From 292ed46c6066d47289f1330b1c2bcc6d74761f95 Mon Sep 17 00:00:00 2001
From: chen <15335560115@163.com>
Date: 星期五, 20 九月 2024 12:04:52 +0800
Subject: [PATCH] 安邦车载V1.1,4G 1s上传,升级逻辑和4G服务器配置和安邦手环一样,

---
 keil/uwb_app.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/keil/uwb_app.c b/keil/uwb_app.c
index 5677682..ae440f3 100644
--- a/keil/uwb_app.c
+++ b/keil/uwb_app.c
@@ -344,7 +344,7 @@
     uwb_tx(send_buffer, 40,1 ,resp_tx_en_start_u32);//立即发送测试size大小
     temp_count1=phy_timer_count_get();
     while(mac_is_busy());
-    gpio_pin_clr(SCL_PIN);
+//    gpio_pin_clr(SCL_PIN);
 }
 uint16_t uwb_searchcount,uwb_timer_reload_value = 496;
 uint8_t range_success;
@@ -380,7 +380,9 @@
     range_success = 0;
     receive_flag = 0;
     temp_count3=phy_timer_count_get();
+		#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));//测试
-                
+                #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();
+		#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));//测试
+								#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);
+		#ifdef DEBUG_BOXING
     gpio_pin_clr(SCL_PIN);//测试
+		#endif
     return 0;//返回绑定失败标志
 }
 //}

--
Gitblit v1.9.3