fix: 离开延时 OUT_DELAY 改为可配置 relay_delay
- Loop154_Unit 新增 relay_delay 字段 - storage.c 从 delay_time 计算: relay_delay = delay_time * 2 - TMR15_GLOBAL_IRQHandler 使用 unit->relay_delay 替代固定 OUT_DELAY
This commit is contained in:
@@ -271,7 +271,7 @@ void TMR15_GLOBAL_IRQHandler(void)
|
||||
if (unit->loop_FLAG_OUT) {
|
||||
if (!unit->SET_DLY) {
|
||||
unit->OUTCNT++;
|
||||
if (unit->OUTCNT > OUT_DELAY) {
|
||||
if (unit->OUTCNT > unit->relay_delay) {
|
||||
unit->loop_FLAG_OUT = 0;
|
||||
unit->loop_FLAG_PLUSE = 1;
|
||||
unit->OUTCNT = 0;
|
||||
|
||||
Reference in New Issue
Block a user