From e0c70da5ce5b2504d2ac4cce68376d1ab5cdf208 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期五, 21 五月 2021 17:01:25 +0800
Subject: [PATCH] 标签输出坐标,测试完成

---
 源码/核心板/Src/application/serial_at_cmd_app.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/serial_at_cmd_app.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/serial_at_cmd_app.c"
index 4b56af1..d5fd00c 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/serial_at_cmd_app.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/serial_at_cmd_app.c"
@@ -9,6 +9,7 @@
 #define MSG_WTAG  6
 #define MSG_PWTAG 8
 #define MSG_REGTAGRESPONSE 0x0b
+#define MSG_TAGPOS 0x0D
 
 #define CMD_READ	1
 #define CMD_WRITE	2
@@ -61,8 +62,10 @@
 }
 u8 remotetag_para[30],remotetag_paralen;
 u8 remotesend_state=0;
+extern u16 taglist_pos;
 uint16_t configremotetagID;
 struct regtag_structure regtag_map;
+struct tagpos_structure tagpos[50];
 void UsartParseDataHandler(uint8_t data)
 {
 	static UsartRecvPackState usart_receive_state = UsartReceiveWaitHead0;
@@ -83,7 +86,7 @@
 		if(((data + checksum)&0xff) == 0xFF)				//校验通过
 		{
 			switch(pack_msgtype)
-			{
+			{uint16_t serial_tag_id_recv;
 				case MSG_RW:
 						 pack_cmd = mUsartReceivePack[0];
 						 pack_index = mUsartReceivePack[1];
@@ -135,6 +138,13 @@
 					memcpy(&regtag_map.tag_frequency[regtag_map.index],&mUsartReceivePack[2],2);
 					memcpy(&regtag_map.tag_slotpos[regtag_map.index],&mUsartReceivePack[4],2);
 					break;
+                case MSG_TAGPOS:             
+                    memcpy(&serial_tag_id_recv,&mUsartReceivePack[0],2);
+                    taglist_pos=CmpTagInList(serial_tag_id_recv);
+                    tagpos[taglist_pos].tagid = serial_tag_id_recv;
+                    memcpy(&tagpos[taglist_pos].baoxu,&mUsartReceivePack[2],2);
+                    memcpy(&tagpos[taglist_pos].pos,&mUsartReceivePack[4],12);
+                    break;
 		}
 			SendConfigConfirm(pack_msgtype,pack_length);
 		}

--
Gitblit v1.9.3