fix(vd960Loop): init_vd_single 灵敏度从配置读, 不再硬编码 2
现场日志: 配置 SENS=3/2/1/0, 检测全用 sens_in:36 (SENS=2 表值)
根因: main→para_store_init() 同步 loop_SensLevel=配置, 但任务启动后
INIT_VDs()→init_vd_single() 硬编码 loop_SensLevel=2 覆盖配置 → 全通道 SENS=2
修复: init_vd_single 改为 sens_level_from_config(
g_loop_cng_info.loop_cng[unit->loop_num].sensitvity)
另: flash 灵敏度表 sens[0]={512,400} 为坏数据(出厂应为{216,108}),
修复后 loop_3(SENS=0) 会撞上异常值, 需恢复出厂清配置区
This commit is contained in:
@@ -108,7 +108,8 @@ void init_vd_single(Loop154_Unit *unit)
|
||||
unit->loop_CAP_OK = 0;
|
||||
unit->loop_CAPVD = 0;
|
||||
|
||||
unit->loop_SensLevel = 2; // 默认中灵敏度
|
||||
unit->loop_SensLevel = sens_level_from_config(
|
||||
g_loop_cng_info.loop_cng[unit->loop_num].sensitvity); // 从配置读, 不再硬编码 2 (修复: INIT_VDs 覆盖配置值)
|
||||
unit->Flt_Reg = ALFA_CAP1;
|
||||
|
||||
unit->loop_entry_cnt = 0;
|
||||
|
||||
Reference in New Issue
Block a user