From 5e02aaa74bd161d42cd3a48dc5d6f89491ea29ef Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期二, 31 十二月 2024 16:17:51 +0800 Subject: [PATCH] 新测距算法加入,稳定测距版本 --- keil/dw_app_anchor.h | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/keil/dw_app_anchor.h b/keil/dw_app_anchor.h index b41187b..212c3d5 100644 --- a/keil/dw_app_anchor.h +++ b/keil/dw_app_anchor.h @@ -3,6 +3,11 @@ #include "stdint.h" void SetANCTimestap(uint8_t i,uint8_t* pollrx,uint8_t* resptx,uint32_t resprx,uint8_t* distoffset,int32_t anc_clockoffset); void CalculateDists(int64_t poll_tx_ts); +typedef enum +{ UN_BIND=0, + LINK_SUCCESS, + SEARCH_DEV, +} Operation_step; #define MBX_RESPONSE 0x21 #define MBX_POLL 0x20 #define MBX_RESPONSE 0x21 @@ -14,11 +19,11 @@ #define GROUP_ID_IDX 0 #define ANCHOR_ID_IDX 1 #define MAX_NEARBASE_NUM 25 -#define TAG_KEEPTIMES 30 //标签存活时间 #define KEEP_TIMES 5 #define TAG_NUM_IN_SYS 25 #define FZ_NEARBASENUM_INDEX 10 #define FZ_NEARBASEID_INDEX 11 +#define ANC_MAX_NUM 50 #define DIST_IDX 10 #define SEQUENCE_IDX 3 @@ -28,7 +33,7 @@ #define RESP_MSG_RESP_TX_TS_IDX 30 #define RESP_MSG_ANC_DISTOFFSET 34 -#define TAG_KEEPTIMES 30 //标签存活时间 +#define TAG_KEEPTIMES 20 //标签存活时间 #define MAX_TAG_LIST_NUM 200 //同时通讯标签最大数量 #define FREQ_OFFSET_MULTIPLIER (998.4e6/2.0/1024.0/131072.0) -- Gitblit v1.9.3