From e54166d028ed6c32324d24fc28c54c8194906c60 Mon Sep 17 00:00:00 2001 From: zhangbo <zhangbo@qq.com> Date: 星期一, 24 二月 2025 16:38:27 +0800 Subject: [PATCH] 测试阶段:可以跟多个UWB基站测距,以及蓝牙协议转发,现在上传协议是强制写进去的,然后还有那个基站,标签时间同步没有调试正常, --- keil/uwb_app.c | 41 +++-------------------------------------- 1 files changed, 3 insertions(+), 38 deletions(-) diff --git a/keil/uwb_app.c b/keil/uwb_app.c index 650e466..bc7e8de 100644 --- a/keil/uwb_app.c +++ b/keil/uwb_app.c @@ -415,49 +415,13 @@ uint8_t i; uint16_t tempid; - // The following peripherals will be initialized in the uwb_open function - // phy/mac/aes/lsp/phy timers initialized - //uwb_open(); - -//// // Set calibration parameters -// uwb_calibration_params_set(config.phy_cfg.ch_num); -// // set advanced parameters -// struct PHY_ADV_CONFIG_T adv_config = { -// .thres_fap_detect = 40, -// .nth_scale_factor = 4, -// .ranging_performance_mode = 0, -// .skip_weakest_port_en = 0, -// }; -// phy_adv_params_configure(&adv_config); - -// // uwb configure -// uwb_configure(config.phy_work_mode, board_param.tx_power_fcc[CALIB_CH(config.phy_cfg.ch_num)], &config.phy_cfg); - -// ranging_frame_type_set(config.phy_cfg.sts_pkt_cfg); - - // Register rx interrupt callback function mac_register_process_handler(tx_int_callback, rx_int_callback); receive_flag = 0; flag_recsuccess = 0; -// temp_count3=phy_timer_count_get(); - //gpio_pin_set(SCL_PIN); - // time_count_dkjs=phy_timer_count_get(); -// gpio_pin_set(IO_PIN_5);//测试 -// gpio_pin_clr(IO_PIN_5); + uwb_rxflag=uwb_rx(0, 0, range_timeout_us);//开启接收 -// gpio_pin_clr(IO_PIN_5); -// gpio_pin_clr(IO_PIN_5);//测试 - #ifdef DEBUG_BOXING -// gpio_pin_clr(IO_PIN_5);//测试 -// gpio_pin_set(IO_PIN_5);//测试 - #endif -// #ifdef DEBUG_BOXING -// gpio_pin_set(IO_PIN_5);//测试 -// #endif -// #ifdef DEBUG_BOXING -// gpio_pin_set(IO_PIN_5);//测试 -// #endif + uwb_rxflag_num1++; // while(mac_is_busy()); // temp_count2=phy_timer_count_get(); @@ -551,6 +515,7 @@ } recev_error_num=0; + // sleep_timer_start(__MS_TO_32K_CNT(UWB_DELAY_TIME_US));//测试 // LOG_INFO(TRACE_MODULE_APP,"标签ID:%X,距离: %d 信号强度:%d.\r\n",g_com_map[BIND_DEV_ID],distance,rssi); -- Gitblit v1.9.3