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/dw_app.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 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 6f64230..8abd7f6 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" @@ -953,7 +953,7 @@ extern uint16_t configremotetagID; extern u8 remotetag_paralen; u8 finalsend=0; - +u8 tagpossend_flag; u8 Anchor_RecNearPoll(u8 ancrec_nearbasepos) //0 mainbase 1 first near_base { @@ -970,7 +970,14 @@ dwt_setrxaftertxdelay(RESP_TX_TO_FINAL_RX_DLY_UUS+(rec_nearbase_num+1-ancrec_nearbasepos)*DELAY_BETWEEN_TWO_FRAME_UUS);//设置发送完成后开启接收延迟时间 dwt_setrxtimeout(FINAL_RX_TIMEOUT_UUS);//接收超时时间 //dwt_readdiagnostics(&d1); - + if(tagpos[taglist_pos].tagid==tag_id_recv) + { + memcpy(&tx_nearresp_msg[TAGPOS_INDEX],&tagpos[taglist_pos],16); + tagpossend_flag = 1; + }else{ + tagpossend_flag = 0; + } + if(new_tagid) { tagdist_list[taglist_pos]=0x1ffff; @@ -983,7 +990,7 @@ tx_nearresp_msg[MOTORSTATE_INDEX]=(remotesend_state<<4)|motorstate; waittagconfig_reponse=0; finalsend = 0; - if(pwtag.remain_time>0) + if(pwtag.remain_time>0)//远程修改标签参数 {uint8_t i; for(i=0;i<pwtag.groupnum;i++) { @@ -1008,8 +1015,8 @@ if(finalsend == 0) { - dwt_writetxdata(24, tx_nearresp_msg, 0);//写入发送数据 - dwt_writetxfctrl(24, 0);//设定发送长度 + dwt_writetxdata(24+tagpossend_flag*16, tx_nearresp_msg, 0);//写入发送数据 + dwt_writetxfctrl(24+tagpossend_flag*16, 0);//设定发送长度 } // if(remotesend_state&&tag_id_recv==configremotetagID) -- Gitblit v1.9.3