zhyinch
2022-10-11 b930edd3675dbc937717ae680b2aee4593a3e414
Ô´Âë/ºËÐİå/Src/application/dw_app.c
@@ -7,9 +7,9 @@
   NEARPOLL,
}tag_state=GETNEARMSG;
static dwt_config_t config = {
   2,               /* Channel number. */
   3,               /* Channel number. */
   DWT_PRF_64M,     /* Pulse repetition frequency. */
   DWT_PLEN_64,    /* Preamble length. */
   DWT_PLEN_128,    /* Preamble length. */
   DWT_PAC8,        /* Preamble acquisition chunk size. Used in RX only. */
   9,               /* TX preamble code. Used in TX only. */
   9,               /* RX preamble code. Used in RX only. */
@@ -398,7 +398,7 @@
            dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_RXFCG | SYS_STATUS_TXFRS);//清楚标志位
            frame_len = dwt_read32bitreg(RX_FINFO_ID) & RX_FINFO_RXFLEN_MASK;//数据长度
            dwt_readrxdata(rx_buffer, frame_len, 0);//读取接收数据
         if (rx_buffer[MESSAGE_TYPE_IDX] == FINAL&&!memcmp(&rx_buffer[TAG_ID_IDX],&tag_id_recv,2)) //判断是否为Final包
         if (rx_buffer[MESSAGE_TYPE_IDX] == DISCOVERFINAL&&!memcmp(&rx_buffer[TAG_ID_IDX],&tag_id_recv,2)) //判断是否为Final包
            {
               uint32_t poll_tx_ts, resp_rx_ts, final_tx_ts;
               uint32_t poll_rx_ts_32, resp_tx_ts_32, final_rx_ts_32;
@@ -732,7 +732,7 @@
      {
         uint16_t checksum;
            case DISCOVERPOLL:
                if (anchor_type == rx_buffer[ANCHOR_ID_IDX])
                if (anchor_type == rx_buffer[ANCHOR_ID_IDX]&&g_com_map[NEARSWITCH_DISTANCE_INDEX] != 0)
                {
                taglist_pos=CmpTagInList(tag_id_recv);
            if(taglist_pos==taglist_num)