From 3ddda900487f55bec506562fffd9f38e419a3ecd Mon Sep 17 00:00:00 2001
From: chen <15335560115@163.com>
Date: 星期六, 12 七月 2025 16:34:10 +0800
Subject: [PATCH] 成功调好485串口接和收逻辑,usb串口用于查看log输出和上位机配置,需要注意在打印彻底完成后进行切换

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

diff --git a/keil/uwb_app.c b/keil/uwb_app.c
index 7f46dc1..c35c51d 100644
--- a/keil/uwb_app.c
+++ b/keil/uwb_app.c
@@ -416,8 +416,8 @@
 			
 //				 // filter process
       
-			 LOG_INFO(TRACE_MODULE_APP, "PDoA 0x%04x Azimuth %d Elevation %d FoM %u\r\n",tag_id_recv, mk_q7_to_s16(azimuth),
-                                 mk_q7_to_s16(elevation), fom);
+			 LOG_INFO(TRACE_MODULE_APP, "PDoA 0x%04x Azimuth %d Elevation %d FoM %u area%#x\r\n",tag_id_recv, mk_q7_to_s16(azimuth),
+                                 mk_q7_to_s16(elevation), fom,show_location[taglist_pos]);
 				allow_flag=0;
 			}
 		}
@@ -666,10 +666,13 @@
 		}
 		 taglist_num=j;
 		sort_tag_lists();//增加距离小的排到前面逻辑
-		buffer_message_send();//发送测距报文信息
 		update_show_buffer();//根据角度和距离判断区域位置
-		//delay_ms(10);
+		gpio_pin_set(CHANGE_UART_PIN);//;拉高打印输出
+		buffer_message_send();//发送测距报文信息
+//		//delay_ms(10);
 		buffer_485_send(show_location);//发送显示信息
+			while(uart_tx_in_progress(UART_ID0));
+			gpio_pin_clr(CHANGE_UART_PIN);//;拉低变接收
 }
 
 uint8_t position;

--
Gitblit v1.9.3