From dc1d3b95a0c9e00a47d1da7c7a7854b44c9ba8b1 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期四, 03 十二月 2020 17:00:58 +0800 Subject: [PATCH] 修复回复出厂设置BUG --- 源码/核心板/Src/main.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" index f341743..53b060e 100644 --- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" +++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" @@ -52,7 +52,7 @@ uint16_t vel_factor,pos_factor; extern u8 module_power; -u16 slottime,max_slotnum,current_slotpos; +u16 slottime,max_slotnum,current_slotpos,dist_threshold; void Program_Init(void) {uint16_t i; float temp; @@ -80,6 +80,11 @@ group_id=g_com_map[GROUP_ID]; vel_factor=g_com_map[FILTER_COEFFICIENT]; pos_factor=g_com_map[FILTER_COEFFICIENT]; + dist_threshold = (g_com_map[SPEEDFILTER_THRES]*10)/(1000/g_com_map[COM_INTERVAL]); + if(dist_threshold<300) + {dist_threshold = 300;} + if(dist_threshold>15000) + {dist_threshold = 15000;} if(dev_id==0) sync_mainbase=1; module_power = g_com_map[POWER]; @@ -87,7 +92,7 @@ { module_power=67; } - g_com_map[VERSION] = 0x0123; + g_com_map[VERSION] = 0x0124; temp=(float)g_com_map[MAX_REPORT_ANC_NUM]*4/3; temp2=g_com_map[MAX_REPORT_ANC_NUM]*4/3; if(temp2<temp) -- Gitblit v1.9.3