From 61b5220eefbec3fff8df2fa0ff13d216626df280 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期六, 07 十一月 2020 17:40:07 +0800
Subject: [PATCH] Revert "Revert "Revert "V1.34 增加滤波 防撞1对10发货"""

---
 源码/核心板/Src/main.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c"
index 953c548..014e391 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c"
@@ -71,7 +71,7 @@
 	{
 	  g_com_map[COM_INTERVAL]=100;
 	}
-	g_com_map[VERSION] = 0x011c;	
+	g_com_map[VERSION] = 0x0121;	
 	dev_id = g_com_map[DEV_ID];
 	slottime=ceil((double)g_com_map[MAX_REPORT_ANC_NUM]*SLOT_SCALE)+3;
 	max_slotpos=g_com_map[COM_INTERVAL]/slottime;
@@ -151,6 +151,16 @@
 	}
 	if(flag_newsecond)
 	{
+		uint32_t temp23;
+			temp23 =  dwt_read32bitreg(CHAN_CTRL_ID) ;
+			if(temp23!=0x4A480022)
+			{
+				temp23 =  dwt_read32bitreg(CHAN_CTRL_ID) ;
+					if(temp23!=0x4A480022)
+					{
+						NVIC_SystemReset();
+					}
+				}
 	  flag_newsecond=0;
 		tagpos_binary=0;
 		memcpy(ancidlist_send,ancidlist_rec,ancidlist_num*2);
@@ -162,7 +172,7 @@
 			tagpos_rec[i] = 0;
 		}
 	}
-	if(target_time>1000)
+	if(target_time>=1000)
 	{target_time-=1000;}
 	#ifdef USART_INTEGRATE_OUTPUT
 	if(g_com_map[DEV_ROLE]==0&&usart_send_flag)

--
Gitblit v1.9.3