chen
2024-09-24 8d3393c0a5696e79808eedbe8d3a820aee8c60f7
keil/uwb_tag_.c
@@ -220,9 +220,9 @@
               //获取发射端时钟偏差
         resp_rx_num++;
         freq_offset=phy_freq_offset_get();
         freq_offset_filter=average_filter(freq_offset);//获取频偏
         int32_t ppm = freq_offset_filter / (int32_t)(ch_center_freq_map[UWB_CH_NUM] * 1e-6);
         calib_xtal38m4_load_cap_auto_tune(ppm);//利用电容调整晶振适配频偏应在完整的一包之后调整,需要关闭XTAL_AUTO_TUNE_EN 宏定义避免收包中途校准导致测距错误
      //   freq_offset_filter=average_filter(freq_offset);//获取频偏
         //int32_t ppm = freq_offset_filter / (int32_t)(ch_center_freq_map[UWB_CH_NUM] * 1e-6);
         //calib_xtal38m4_load_cap_auto_tune(ppm);//利用电容调整晶振适配频偏应在完整的一包之后调整,需要关闭XTAL_AUTO_TUNE_EN 宏定义避免收包中途校准导致测距错误
         //LOG_INFO(TRACE_MODULE_APP, "poll_tx_num is %d,resp_rx_num is %d,distance is %lf\r\n",poll_tx_num,resp_rx_num,distance);   
         receive_flag=1;