From 20ef2d42f15f2763a5079929fc7c375e9c94b697 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期六, 09 十一月 2019 14:16:39 +0800
Subject: [PATCH] V1.5 修改数据溢出bug

---
 源码/核心板/Src/application/dw_app.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
index 85812fc..58345cd 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
@@ -134,7 +134,7 @@
 
 static double tof;
 	
-uint32_t anchor_dist_last_frm[TAG_NUM_IN_SYS],his_dist[TAG_NUM_IN_SYS];	;	
+int32_t anchor_dist_last_frm[TAG_NUM_IN_SYS],his_dist[TAG_NUM_IN_SYS];	;	
 uint32_t tag_id = 0;
 uint32_t tag_id_recv = 0;
 uint8_t random_delay_tim = 0;
@@ -615,7 +615,7 @@
 					LED0_BLINK; //每成功一次通讯则闪烁一次
 					g_UWB_com_interval = 0;
 					dis_after_filter=dist_cm;
-					hex_dist = (int16_t)(dist_cm+g_com_map[DIST_OFFSET]);
+					hex_dist = dist_cm+(int16_t)g_com_map[DIST_OFFSET];
 						if(tag_id_recv-TAG_ID_START<=TAG_NUM_IN_SYS)
 					if(abs(hex_dist-his_dist[tag_id_recv-TAG_ID_START])<1000)
 					{

--
Gitblit v1.9.3