From 96a63685fd53bd939772377296a9e732333e3748 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期一, 28 三月 2022 10:23:16 +0800 Subject: [PATCH] V2.47 可能有无法接收数据的bug --- 源码/核心板/Src/application/serial_at_cmd_app.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 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 198e8a5..1d89251 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 @@ -79,6 +80,8 @@ u8 remotesend_state=0; uint16_t configremotetagID,rec_times1,rec_times2; struct regtag_structure regtag_map; +extern u16 taglist_pos; +struct tagpos_structure tagpos[10]; void UsartParseDataHandler(uint8_t data) { static UsartRecvPackState usart_receive_state = UsartReceiveWaitHead0; @@ -100,6 +103,7 @@ { switch(pack_msgtype) { + uint16_t serial_tag_id_recv; case MSG_RW: pack_cmd = mUsartReceivePack[0]; pack_index = mUsartReceivePack[1]; @@ -172,6 +176,14 @@ memcpy(®tag_map.tag_frequency[regtag_map.index],&mUsartReceivePack[2],2); memcpy(®tag_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; + tagpos[taglist_pos].datalen = mUsartReceivePack[2]; + if(mUsartReceivePack[2]<=30) + memcpy(&tagpos[taglist_pos].data,&mUsartReceivePack[3],mUsartReceivePack[2]); + break; } SendConfigConfirm(pack_msgtype,pack_length); } -- Gitblit v1.9.3