From 0e91bca2aaebc14a6ea8ef97433d4a7953876ffa Mon Sep 17 00:00:00 2001 From: yincheng.zhong <634916154@qq.com> Date: 星期三, 29 三月 2023 15:08:23 +0800 Subject: [PATCH] Merge branch '防撞' of http://47.108.70.204:60062/r/XRange_Tag into 防撞 --- Src/application/dw_app.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Src/application/dw_app.c b/Src/application/dw_app.c index 71a1b17..4a135d9 100644 --- a/Src/application/dw_app.c +++ b/Src/application/dw_app.c @@ -78,7 +78,7 @@ NEARPOLL, }tag_state=GETNEARMSG; static dwt_config_t config = { - 2, /* Channel number. */ + 5, /* Channel number. */ DWT_PRF_64M, /* Pulse repetition frequency. */ DWT_PLEN_128, /* Preamble length. */ DWT_PAC8, /* Preamble acquisition chunk size. Used in RX only. */ @@ -295,6 +295,7 @@ u8 nearbase_num=0,last_nearbase_num,next_nearbase_num,last_slotnum, para_update,para_len,stationary_flag=0; u32 rec_tagpos_binary; int16_t offset=2700; +extern int16_t g_commap_antdelay; u8 motor_state,rec_remotepara_state,rec_remotepara[80]; void NearPoll(void) { @@ -324,9 +325,10 @@ tx_near_msg[NEARBASENUM_INDEX] = nearbase_num; memcpy(&tx_near_msg[NEARBASEID_INDEX],&nearbaseid_list,nearbase_num*2); tx_near_msg[MESSAGE_TYPE_IDX] = NEAR_POLL; + memcpy(&tx_near_msg[NEARBASEID_INDEX+nearbase_num*4],&g_commap_antdelay,2); memcpy(&tx_near_msg[ANCHOR_ID_IDX],&mainbase_id,2); - dwt_writetxdata(13+2*nearbase_num, tx_near_msg, 0);//将Poll包数据传给DW1000,将在开启发送时传出去 - dwt_writetxfctrl(13+2*nearbase_num, 0);//设置超宽带发送数据长度 + dwt_writetxdata(15+4*nearbase_num, tx_near_msg, 0);//将Poll包数据传给DW1000,将在开启发送时传出去 + dwt_writetxfctrl(15+4*nearbase_num, 0);//设置超宽带发送数据长度 dwt_starttx(DWT_START_TX_IMMEDIATE | DWT_RESPONSE_EXPECTED);//开启发送,发送完成后等待一段时间开启接收,等待时间在dwt_setrxaftertxdelay中设置 tx_near_msg[TAGCONFIGSUCCESS_INDEX] =0; -- Gitblit v1.9.3