fix: 修复灵敏度无法修改 + 调整有限存在时间 + 版本号更新
- dbn_ble_srv.c: unpack_pkg_set_cjq_param() 中同步更新 g_freq_sens, 修复 BLE 小程序修改灵敏度无效的 bug - dbn_ble_srv.c: g_hold_time 公式对齐 para_store_init (20*5) - peripheral_main.c: g_freq_sens 从 INIT_VD 写死值移到 para_store_init() 从存储读取 - cmcng.h: 固件 v3.00, 硬件 v3.01
This commit is contained in:
@@ -430,7 +430,8 @@ static void unpack_pkg_set_cjq_param(uint8_t *pkg, uint8_t len)
|
|||||||
|
|
||||||
g_function_mode = (g_loop_cng_unit.direction_mode >> 4) & 0x0F;
|
g_function_mode = (g_loop_cng_unit.direction_mode >> 4) & 0x0F;
|
||||||
|
|
||||||
g_hold_time = g_loop_cng_unit.exist_mode * 30 * 20;
|
g_hold_time = g_loop_cng_unit.exist_mode * 20 * 5;
|
||||||
|
g_freq_sens = (g_loop_cng_unit.sensitvity > 0) ? (g_loop_cng_unit.sensitvity - 1) : 0;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
tmp[i++] = g_loop_cng_unit.sensitvity;
|
tmp[i++] = g_loop_cng_unit.sensitvity;
|
||||||
|
|||||||
@@ -17,12 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PRODUCT_MODEL "DLD154Pro"
|
#define PRODUCT_MODEL "DLD154Pro"
|
||||||
#define FIRMWARE_VER "4.01"
|
#define FIRMWARE_VER "3.00"
|
||||||
#define HARDWARE_VER "1.00"
|
#define HARDWARE_VER "3.01"
|
||||||
#define FIRMWARE_VER_MAIN 4
|
#define FIRMWARE_VER_MAIN 3
|
||||||
#define FIRMWARE_VER_SUB 1
|
#define FIRMWARE_VER_SUB 0
|
||||||
#define HARDWARE_VER_MAIN 1
|
#define HARDWARE_VER_MAIN 3
|
||||||
#define HARDWARE_VER_SUB 0
|
#define HARDWARE_VER_SUB 1
|
||||||
|
|
||||||
/* 功能模式�? (direction_mode �?4�?, 协议保留; 新算法不再消�?) */
|
/* 功能模式�? (direction_mode �?4�?, 协议保留; 新算法不再消�?) */
|
||||||
#define FUNCTION_A 0x01 // 二次判断 (已废�?)
|
#define FUNCTION_A 0x01 // 二次判断 (已废�?)
|
||||||
|
|||||||
@@ -298,6 +298,7 @@ void para_store_init(void)
|
|||||||
g_safe_max_cnt = g_loop_cng_unit.loopSafe_Timeout * 10 * (1000 / 50);
|
g_safe_max_cnt = g_loop_cng_unit.loopSafe_Timeout * 10 * (1000 / 50);
|
||||||
g_freq_level = g_loop_cng_unit.loopFreq_Level - 1;
|
g_freq_level = g_loop_cng_unit.loopFreq_Level - 1;
|
||||||
g_function_mode = g_loop_cng_unit.direction_mode >> 4;
|
g_function_mode = g_loop_cng_unit.direction_mode >> 4;
|
||||||
|
g_freq_sens = (g_loop_cng_unit.sensitvity > 0) ? (g_loop_cng_unit.sensitvity - 1) : 0;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
g_freq_level = 0;
|
g_freq_level = 0;
|
||||||
@@ -439,8 +440,6 @@ void INIT_VD(void)
|
|||||||
loop1_SensLevel = 2;
|
loop1_SensLevel = 2;
|
||||||
Flt_Reg = ALFA_CAP1; //79
|
Flt_Reg = ALFA_CAP1; //79
|
||||||
|
|
||||||
g_freq_sens = 2; // DLD154Pro: 灵敏度默认最高, 小程序可调
|
|
||||||
|
|
||||||
loop1_ORG_CNT = 0;
|
loop1_ORG_CNT = 0;
|
||||||
loop1_ORG_SUM = 0;
|
loop1_ORG_SUM = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user