From e3cc01b77b6f240140d2536e365e559b42d1505c Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期二, 22 七月 2025 15:27:30 +0800 Subject: [PATCH] V1.0 开发完成 5S一次,实际休眠时间要诚5 上位机设置除以5就行 休眠18ua 功耗 --- keil/dw_tag.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/keil/dw_tag.c b/keil/dw_tag.c index b48c51d..ebedd00 100644 --- a/keil/dw_tag.c +++ b/keil/dw_tag.c @@ -35,8 +35,8 @@ memcpy(&anc_resptx[i],resptx,4); memcpy(&tag_resprx[i],&resprx,4); memcpy(&anc_distoffset[i],distoffset,2); - memcpy(&tag_polltx[i],&polltx,4); - //anc_clockoffset[i] = anc_clockoffset_from_MK;//MK8000修改 + memcpy(&tag_polltx[i],&polltx,4); + anc_clockoffset[i] = freq_offset;//MK8000修改 } //void CalculateDists1(int64_t poll_tx_ts) //{ @@ -84,6 +84,7 @@ if(exsistbase_list[i]==KEEP_TIMES) { + exsistbase_list[i]--; //temp_freq_offset=freq_offset_filter;//测试 memcpy(&resp_tx_timestamp,&anc_resptx[i],4); memcpy(&poll_rx_timestamp,&anc_pollrx[i],4); @@ -107,7 +108,7 @@ // correct antenna delay // tround -= ranging_ant_delays_get(uwb_app_config.ppdu_params.rx_ant_id); // corrected by frequency offset - tround = (int64_t)((double)tround * (1 - (double)freq_offset_filter / ch_center_freq_map[UWB_CH_NUM])); + tround = (int64_t)((double)tround * (1 - (double)anc_clockoffset[i] / ch_center_freq_map[UWB_CH_NUM])); tround_temp=tround; treply_temp=treply; tof_i = (int32_t)(tround - treply) / 2; @@ -127,8 +128,11 @@ if(distance_tag>-1000&&distance_tag<100000) { - nearbase_distlist[i] = distance_tag+(int16_t)g_com_map[OFFSET_AS_TAG];//offset加入上位机校准 + nearbase_distlist[i] = distance_tag+(int16_t)g_com_map[DIST_OFFSET];//offset加入上位机校准 } + else{ + nearbase_distlist[i] = 0x1ffff; + } }else{ nearbase_distlist[i] = 0x1ffff; } -- Gitblit v1.9.3