From c0eb11511ce61608b63e4e4334d4bac797fa9856 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期五, 26 三月 2021 14:11:13 +0800 Subject: [PATCH] V1.43 1.使用非标准SFD模式。2去掉芯片状态检测 --- 源码/核心板/Src/application/dw_app.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c" index d6187bd..aa1e615 100644 --- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c" +++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c" @@ -14,7 +14,7 @@ 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. */ - 0, /* Use non-standard SFD (Boolean) */ + 1, /* Use non-standard SFD (Boolean) */ DWT_BR_6M8, /* Data rate. */ DWT_PHRMODE_STD, /* PHY header mode. */ (129 + 8 - 8) /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */ @@ -828,6 +828,7 @@ dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_ALL_RX_ERR); } } +extern u16 dist_threshold; u8 misdist_num[TAG_NUM_IN_SYS],seize_anchor,getrange_success=0; u8 Anchor_RecNearPoll(u8 ancrec_nearbasepos) //0 mainbase 1 first near_base { @@ -929,9 +930,9 @@ dis_after_filter=dist_cm; hex_dist = dist_cm+(int16_t)g_com_map[DIST_OFFSET]*10; g_flag_Taggetdist[taglist_pos]=0; - if(hex_dist>0&&hex_dist<2000000) + if(hex_dist>-10000&&hex_dist<2000000) { - if(abs(hex_dist-his_dist[taglist_pos])<10000||misdist_num[taglist_pos]>3) + if(abs(hex_dist-his_dist[taglist_pos])<dist_threshold||misdist_num[taglist_pos]>3) { int32_t filter_dist; #ifdef TDFILTER -- Gitblit v1.9.3