WXK
2025-04-18 52339a8243f5a4ee7f3471d19eae4cc0293c14e1
keil/uwb_app.c
@@ -116,7 +116,7 @@
    uint8_t phy_work_mode; /* PHY_TX / PHY_RX / PHT_TX|PHY_RX */
    struct UWB_CONFIG_T phy_cfg;
};
extern uint8_t uwb_ch;
static struct mk_uwb_configure config = {
    .phy_work_mode = (uint8_t)(PHY_TX | PHY_RX),
    .phy_cfg.ch_num = 5,                      /* Channel number.                           */
@@ -251,6 +251,7 @@
        rssi = rx_report->rssi;
        receive_flag=1;
//        uart_send(UART_ID0, rx_buf,rx_length, NULL);
        gpio_pin_toggle(IO_PIN_4);
        if(rx_buf[MESSAGE_TYPE_IDX]==MBX_POLL)
        {
        Anchor_App();
@@ -317,7 +318,7 @@
//            }
            }
        }
         #ifdef STS_MODE
            valid_sts= sts_valid_check();
      if (valid_sts)
@@ -885,6 +886,7 @@
    phy_rx_ant_mode_set(RX_ANT_PORTS_COMBINATION);
   #endif
    // Set calibration parameters
    config.phy_cfg.ch_num=g_com_map[NEARBASE_ID1];
    uwb_calibration_params_set(config.phy_cfg.ch_num);
   #ifndef STS_MODE
   // set advanced parameters