From a6ddff5c49ef22b708bd739c83648af738b8f598 Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期二, 15 十月 2024 14:47:00 +0800
Subject: [PATCH] 2.13,修复跟主基站测距131071,修复切换主机占测距跟id不匹配的bug

---
 Src/application/dw_app.h |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Src/application/dw_app.h b/Src/application/dw_app.h
index 8a90dc3..84376af 100644
--- a/Src/application/dw_app.h
+++ b/Src/application/dw_app.h
@@ -19,7 +19,7 @@
 #define HEX_OUTPUT
 #define TOTAL_SLOTNUM 200
 #define SLOTTIME_MS 48
-#define SLOT_SCALE 0.55
+#define SLOT_SCALE 0.8
 #define MAX_NEARBASE_NUM 12
 #define KEEP_TIMES 3
 
@@ -45,9 +45,13 @@
 #define NEAR_RESPONSE   			0x07
 #define NEAR_FINAL   					0x08
 #define SPOLL     							0x09
+
 #define DISCOVERPOLL     				    0x0A
 #define DISCOVERRESPONSE     				    0x0B
 #define DISCOVERFINAL     				    0x0C
+
+#define DISCOVERPOLL2     				    0x1A
+
 
 #define POS_MSG   						0x15
 #define POS_POLL   					    0x16
@@ -61,7 +65,7 @@
 #define GROUP_ID_IDX   				0
 #define ANCHOR_ID_IDX    			1
 #define TAG_ID_IDX    				5
-#define MESSAGE_TYPE_IDX 			9	
+#define MESSAGE_TYPE_IDX 			9
 #define POLL_USERDATA_IDX 32
 #define NEARBASENUM_INDEX    18
 #define NEARBASEID_INDEX		 19
@@ -133,7 +137,7 @@
 extern uint32_t g_UWB_com_interval;
 extern float dis_after_filter;
 
-extern uint8_t usart_send[40];
+extern uint8_t usart_send[150];
 
 void IdleTask(void);
 uint16_t Checksum_u16(uint8_t* pdata, uint32_t len);

--
Gitblit v1.9.3