mirror of https://github.com/arendst/Tasmota.git
update Motordelay stop issue ##10033
reorder stop to esure direct stop after command
This commit is contained in:
parent
8a29adfa8b
commit
48bc3c9409
|
@ -430,10 +430,6 @@ void ShutterDecellerateForStop(uint8_t i)
|
||||||
void ShutterPowerOff(uint8_t i) {
|
void ShutterPowerOff(uint8_t i) {
|
||||||
AddLog_P(LOG_LEVEL_DEBUG, PSTR("SHT: Stop Shutter %d. Switchmode %d"), i,Shutter[i].switch_mode);
|
AddLog_P(LOG_LEVEL_DEBUG, PSTR("SHT: Stop Shutter %d. Switchmode %d"), i,Shutter[i].switch_mode);
|
||||||
ShutterDecellerateForStop(i);
|
ShutterDecellerateForStop(i);
|
||||||
if (Shutter[i].direction !=0) {
|
|
||||||
Shutter[i].direction = 0;
|
|
||||||
delay(MOTOR_STOP_TIME);
|
|
||||||
}
|
|
||||||
switch (Shutter[i].switch_mode) {
|
switch (Shutter[i].switch_mode) {
|
||||||
case SHT_SWITCH:
|
case SHT_SWITCH:
|
||||||
if ((1 << (Settings.shutter_startrelay[i]-1)) & TasmotaGlobal.power) {
|
if ((1 << (Settings.shutter_startrelay[i]-1)) & TasmotaGlobal.power) {
|
||||||
|
@ -465,6 +461,10 @@ void ShutterPowerOff(uint8_t i) {
|
||||||
ExecuteCommand(scmnd, SRC_BUTTON);
|
ExecuteCommand(scmnd, SRC_BUTTON);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (Shutter[i].direction !=0) {
|
||||||
|
Shutter[i].direction = 0;
|
||||||
|
delay(MOTOR_STOP_TIME);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShutterUpdatePosition(void)
|
void ShutterUpdatePosition(void)
|
||||||
|
|
Loading…
Reference in New Issue