From c7bcc24c444c9b9197beb9ce6541f85e6b4f8c5c Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期二, 06 四月 2021 11:00:08 +0800 Subject: [PATCH] 增加WIFI串口输出模式,待测试 --- 源码/核心板/Src/application/dw_app.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 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 2227003..088b3aa 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" @@ -918,6 +918,7 @@ uint32_t time_monitor[10]; extern uint16_t configremotetagID; extern u8 remotetag_paralen; +u8 finalsend=0; u8 misdist_num[TAG_NUM_IN_SYS],seize_anchor,waittagconfig_reponse,motorstate=0; u8 Anchor_RecNearPoll(u8 ancrec_nearbasepos) //0 mainbase 1 first near_base { @@ -947,6 +948,7 @@ tx_nearresp_msg[MESSAGE_TYPE_IDX]=NEAR_RESPONSE; tx_nearresp_msg[MOTORSTATE_INDEX]=(remotesend_state<<4)|motorstate; waittagconfig_reponse=0; + finalsend = 0; if(pwtag.remain_time>0) {uint8_t i; for(i=0;i<pwtag.groupnum;i++) @@ -964,11 +966,14 @@ dwt_writetxdata(24+remotetag_paralen, tx_nearresp_msg, 0);//写入发送数据 dwt_writetxfctrl(24+remotetag_paralen, 0);//设定发送长度 remotesend_state=0; + finalsend = 1; break; } } + } - }else{ + if(finalsend == 0) + { dwt_writetxdata(24, tx_nearresp_msg, 0);//写入发送数据 dwt_writetxfctrl(24, 0);//设定发送长度 } @@ -1083,9 +1088,9 @@ misdist_num[taglist_pos]++; } } - if(rx_buffer[TAGCONFIGSUCCESS_INDEX]==1&&waittagconfig_reponse) + if(rx_buffer[TAGCONFIGSUCCESS_INDEX]==1) { - waittagconfig_reponse = 0; + remotesend_state = 0; usart_send[2] = 7;//正常模式 usart_send[3] = 5;//数据段长度 -- Gitblit v1.9.3