zhyinch
2019-12-01 26a3a95b25f10e92061d1cf1ef2b46503134718e
40米不该、 软件修改
已修改2个文件
18 ■■■■■ 文件已修改
源码/核心板/Src/application/dw_app.c 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/main.c 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Ô´Âë/ºËÐİå/Src/application/dw_app.c
@@ -479,7 +479,7 @@
{
    uint32_t frame_len;
    uint32_t resp_tx_time;
    static u8 misdist_num;
    /* Clear reception timeout to start next ranging process. */
    dwt_setrxtimeout(0);//设定接收超时时间,0位没有超时时间
@@ -611,8 +611,9 @@
                    g_UWB_com_interval = 0;
                    dis_after_filter=dist_cm;
                    hex_dist = dist_cm+(int16_t)g_com_map[DIST_OFFSET];
                    if(hex_dist>1000)
                    {hex_dist=hex_dist;}
                    if(hex_dist-anchor_dist_last_frm[tag_id_recv-TAG_ID_START]<1500||misdist_num>4)
                    {
                        misdist_num=0;
                    if(hex_dist<100000&&hex_dist>-1000)
                    {
                        if(tag_id_recv-TAG_ID_START<=TAG_NUM_IN_SYS)
@@ -645,9 +646,12 @@
                    Modbus_HoldReg[tag_id_recv*2+1]=anchor_dist_last_frm[tag_id_recv-TAG_ID_START];
                    //dis_after_filter = LP_Frac_Update(p_Dis_Filter, dist_cm);
                        }
                    }
                    }else{
                        LED0_BLINK;
                    }
                        misdist_num++;
                    }
                if(anchor_dist_last_frm[tag_id_recv-TAG_ID_START]>1000)
                {anchor_dist_last_frm[tag_id_recv-TAG_ID_START]=anchor_dist_last_frm[tag_id_recv-TAG_ID_START];}
                }
            }else{
                /* Clear RX error events in the DW1000 status register. */
Ô´Âë/ºËÐİå/Src/main.c
@@ -11,7 +11,7 @@
#include "global_param.h"
#include "ADC.h"
#define DEBUG_MODE
//#define DEBUG_MODE
void Device_Init(void)
{
@@ -63,7 +63,7 @@
    g_com_map[COM_INTERVAL]=50;
    g_com_map[MAX_REPORT_ANC_NUM]=3;
    g_com_map[DEV_ID]=1;
    g_com_map[ANC_POLL]=0;
    g_com_map[ANC_POLL]=1;
#endif
        dev_id = g_com_map[DEV_ID];
        g_com_map[VERSION] = 0x010a;