mirror of https://github.com/arendst/Tasmota.git
#14678 added option to let direction relay execute before power on
Added to new user_config.override options #define SHUTTER_RELAY_OPERATION_TIME = 100 // wait for direction relay 0.1sec before power up main relay #define MOTOR_STOP_TIME = 500 // wait 0.5 second after stop to do any other action. e.g. move in the opposite direction
This commit is contained in:
parent
06cdb42cec
commit
8676ca0ede
|
@ -1185,8 +1185,8 @@ void CmndShutterPosition(void)
|
|||
}
|
||||
if (Shutter[index].direction != new_shutterdirection) {
|
||||
ShutterStartInit(index, new_shutterdirection, Shutter[index].target_position);
|
||||
uint8_t save_direction = Shutter[i].direction;
|
||||
Shutter[i].direction = 0; // set temporary direction = 0 to avoid RTC timer sarting. Some delay may happen before shutter starts moving
|
||||
uint8_t save_direction = Shutter[index].direction;
|
||||
Shutter[index].direction = 0; // set temporary direction = 0 to avoid RTC timer sarting. Some delay may happen before shutter starts moving
|
||||
switch (ShutterGlobal.position_mode) {
|
||||
case SHT_COUNTER:
|
||||
case SHT_PWM_TIME:
|
||||
|
@ -1226,7 +1226,7 @@ void CmndShutterPosition(void)
|
|||
} // if (!ShutterGlobal.skip_relay_change)
|
||||
break;
|
||||
} // switch (ShutterGlobal.position_mode)
|
||||
Shutter[i].direction = save_direction;
|
||||
Shutter[index].direction = save_direction;
|
||||
ShutterGlobal.RelayCurrentMask = 0;
|
||||
} // if (Shutter[i].direction[index] != new_shutterdirection)
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue