Fix shutter mode 1 (#14405)

Fix shutter mode 1 (#14405)
This commit is contained in:
Theo Arends 2022-01-14 10:11:52 +01:00
parent 97b27c504a
commit c692e2f216
1 changed files with 1 additions and 1 deletions

View File

@ -476,6 +476,7 @@ void ShutterPowerOff(uint8_t i)
{
AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Stop %d. Mode %d, time:%d"), i+1,Shutter[i].switch_mode, Shutter[i].time); // fix log to indicate correct shutter number
ShutterDecellerateForStop(i);
uint8_t cur_relay = Settings->shutter_startrelay[i] + (Shutter[i].direction == 1 ? 0 : (uint8_t)(ShutterGlobal.position_mode == SHT_TIME)) ;
if (Shutter[i].direction !=0) {
Shutter[i].direction = 0;
}
@ -493,7 +494,6 @@ void ShutterPowerOff(uint8_t i)
}
break;
case SHT_PULSE:
uint8_t cur_relay = Settings->shutter_startrelay[i] + (Shutter[i].direction == 1 ? 0 : (uint8_t)(ShutterGlobal.position_mode == SHT_TIME)) ;
// we have a momentary switch here. Needs additional pulse on same relay after the end
if ((SRC_PULSETIMER == TasmotaGlobal.last_source || SRC_SHUTTER == TasmotaGlobal.last_source || SRC_WEBGUI == TasmotaGlobal.last_source)) {
ExecuteCommandPowerShutter(cur_relay, 1, SRC_SHUTTER);