From b16ff1379d8ddbce73ccb46dec527b898effa340 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期五, 06 十一月 2020 15:30:54 +0800
Subject: [PATCH] V2.11 修改基站间隔时间,修改时间片 频率输出医院测试版本

---
 源码/核心板/Src/application/serial_at_cmd_app.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 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 8600cc5..0ec6dc1 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"
@@ -8,11 +8,12 @@
 #define MSG_RW 		3
 #define MSG_WTAG  6
 #define MSG_PWTAG 8
+#define MSG_REGTAGRESPONSE 0x0b
 
 #define CMD_READ	1
 #define CMD_WRITE	2
 #define CMD_REPLY 3
-#define EUART_RX_BUF_SIZE 100
+
 struct pwtag_structure pwtag;
 typedef enum{	UsartReceiveWaitHead0, 
 				UsartReceiveWaitHead1,
@@ -61,6 +62,7 @@
 u8 remotetag_para[30],remotetag_paralen;
 u8 remotesend_state=0;
 uint16_t configremotetagID;
+struct regtag_structure regtag_map;
 void UsartParseDataHandler(uint8_t data)
 {
 	static UsartRecvPackState usart_receive_state = UsartReceiveWaitHead0;
@@ -106,7 +108,7 @@
 							break;
 					}
 					break;
-				case MSG_WTAG:
+				case MSG_WTAG:    //修改标签参数
 					remotesend_state=1;
 					memcpy(&configremotetagID,&mUsartReceivePack[0],2);
 					//configremotetagID = pack_cmd|pack_index<<8;
@@ -114,7 +116,7 @@
 					remotetag_paralen = mUsartReceivePack[4]+3;
 					memcpy(&remotetag_para[1],&mUsartReceivePack[3],remotetag_paralen);
 					break;
-				case MSG_PWTAG:			
+				case MSG_PWTAG:		//批量修改标签参数	
 						pwtag.groupnum = mUsartReceivePack[0];
 						pwtag.index =  mUsartReceivePack[1];
 						pwtag.remain_time = 5;
@@ -124,6 +126,14 @@
 							memcpy(&pwtag.group_interval[i],&mUsartReceivePack[i*6+6],2);
 						}
 							break;
+				case MSG_REGTAGRESPONSE:
+					regtag_map.index++;
+				if(regtag_map.index==MAX_REGTAGNUM)
+				{regtag_map.index = 0;}
+					memcpy(&regtag_map.tagid[regtag_map.index],&mUsartReceivePack[0],2);
+					memcpy(&regtag_map.tag_frequency[regtag_map.index],&mUsartReceivePack[2],2);
+					memcpy(&regtag_map.tag_slotpos[regtag_map.index],&mUsartReceivePack[4],2);
+					break;
 		}
 			SendConfigConfirm(pack_msgtype,pack_length);
 		}

--
Gitblit v1.9.3