WXK
2025-02-18 50bba4559b0c7846613efd6bf9ec8a9c3b1982ce
keil/uwb_app.c
@@ -8,7 +8,7 @@
#include "dw_app_anchor.h"
#include "global_param.h"
#include "board.h"
#include "lora_3029.h"
#include "Lora.h"
#include "lib_aoa.h"
#include <serial_at_cmd_app.h>
extern int simple_main(void);
@@ -37,7 +37,7 @@
extern uint8_t group_id;
static uint16_t anc_id_recv,tag_id_recv;
static int16_t rec_antdelay;
extern uint32_t dev_id;
extern uint16_t dev_id;
static uint16_t taglist_pos,tmp_time;
extern uint16_t tag_frequency;
extern uint16_t disoffset;
@@ -47,7 +47,7 @@
//resp函数
void PushAnchorDataArray(uint16_t ancid,int16_t dist,uint8_t battary);//找到自己的id信息对应位置更新自己的交互信息
static void resp_msg_set_ts(uint8_t *ts_field, int64_t ts);//用来对应位置放入时间戳
static uint16_t tagid_list[TAG_NUM_IN_SYS];
uint16_t tagid_list[TAG_NUM_IN_SYS];
uint16_t CmpTagInList(uint16_t tagid);
uint8_t Anchor_RecNearPoll(uint8_t ancrec_nearbasepos);
static uint8_t send_buffer[100];
@@ -118,7 +118,7 @@
static struct mk_uwb_configure config = {
    .phy_work_mode = (uint8_t)(PHY_TX | PHY_RX),
    .phy_cfg.ch_num = 9,                      /* Channel number.                           */
    .phy_cfg.ch_num = 5,                      /* Channel number.                           */
    .phy_cfg.code_index = 9,                  /* TRX preamble code                         */
    .phy_cfg.mean_prf = MEAN_PRF_64M,         /* Mean prf 64/128/256M                      */
    .phy_cfg.data_bit_rate = DATA_BR_6M8,     /* Data rate 6.8M                            */
@@ -280,7 +280,7 @@
static uint8_t anchordata_bat[TAG_NUM_IN_SYS];
static uint16_t anchordata_version[TAG_NUM_IN_SYS];
uint8_t anchordata_num = 0;
int32_t tagdist_list[TAG_NUM_IN_SYS];
uint16_t tagdist_list[TAG_NUM_IN_SYS];
uint16_t random_time;
//anchor
int32_t hist_dist;