From 643829caa98867a769a95a25a7d6e93042f7b2bc Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期三, 10 七月 2019 14:58:28 +0800
Subject: [PATCH] 去掉标签输出,标签探索6-4响应模式

---
 源码/核心板/Src/application/dw_app.c |   28 +++++-----------------------
 1 files changed, 5 insertions(+), 23 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 3faa8c0..9b4c5fa 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"
@@ -323,6 +323,7 @@
 	{ if(time32_incr - start_poll>20)
 		NVIC_SystemReset();
 		UART_CheckReceive();
+		UART_CheckSend();
 	};
 
 	/* Increment frame sequence number after transmission of the poll message (modulo 256). */
@@ -384,24 +385,6 @@
 			/* Increment frame sequence number after transmission of the final message (modulo 256). */
 
 			random_delay_tim = 0;
-		#ifdef TAG_OUTPUT
-		#ifdef HEX_OUTPUT
-					usart_send[2] = frame_seq_nb++;
-					//usart_send[6] = tag_id_recv;
-					//usart_send[8] = g_com_map[DEV_ID];
-					memcpy(&usart_send[3],&dev_id,4);
-					memcpy(&usart_send[7],&tx_final_msg[ANCHOR_ID_IDX],4);
-					hex_dist = rx_buffer[DIST_IDX];
-					memcpy(&usart_send[11],&hex_dist,4);
-					usart_send[15] = battary;
-					usart_send[16] = button;
-					checksum = Checksum_u16(&usart_send[2],19);
-					memcpy(&usart_send[21],&checksum,2);
-					USART_puts(usart_send,23);
-					#else
-					printf("Anchor ID: %d, Tag ID: %d, Dist = %d cm\n", g_com_map[DEV_ID], tag_id_recv, (uint16_t)dis_after_filter);
-					#endif
-		#endif
 		}
 		else
 		{
@@ -416,17 +399,16 @@
 	}
 //	deca_sleep(10);
 }
-	if(tag_succ_times!=REPOET_ANC_NUM)
+	dwt_entersleep();
+	if(tag_succ_times<REPOET_ANC_NUM_MIN)
 	{
 	random_delay_tim =time32_incr&0x8f+7;
-	}else{
-		random_delay_tim=0;
+	deca_sleep(random_delay_tim);
 	}
 	LED0_BLINK;
-	deca_sleep(random_delay_tim);
 	RTC_SET_ALARM(1);
 	/* Execute a delay between ranging exchanges. */
-	dwt_entersleep();
+	
 }
 
 void Anchor_App(void)

--
Gitblit v1.9.3