From 9974d297265ca4f1db444139561e3796dae4a361 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Sun, 29 Dec 2019 13:04:34 +0700 Subject: [PATCH 1/2] Update xdrv_27_shutter.ino Minor fix in recognizing stepper --- tasmota/xdrv_27_shutter.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_27_shutter.ino b/tasmota/xdrv_27_shutter.ino index 4b3936533..e41acc4dd 100644 --- a/tasmota/xdrv_27_shutter.ino +++ b/tasmota/xdrv_27_shutter.ino @@ -188,7 +188,7 @@ void ShutterInit(void) } } else { Shutter.mode = SHT_OFF_ON__OPEN_CLOSE; - if (pin[GPIO_PWM1+i] < 99 && pin[GPIO_CNTR1+i]) { + if (pin[GPIO_PWM1+i] < 99 && pin[GPIO_CNTR1+i] < 99) { Shutter.mode = SHT_OFF_ON__OPEN_CLOSE_STEPPER; Shutter.pwm_frequency = 0; analogWriteFreq(Shutter.pwm_frequency); From ddbca8e3930296d904d8afb9dd67826fd89b75b9 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Sun, 29 Dec 2019 16:19:26 +0700 Subject: [PATCH 2/2] Update xdrv_27_shutter.ino Fix infinite loop for shutter --- tasmota/xdrv_27_shutter.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_27_shutter.ino b/tasmota/xdrv_27_shutter.ino index e41acc4dd..21970d0fe 100644 --- a/tasmota/xdrv_27_shutter.ino +++ b/tasmota/xdrv_27_shutter.ino @@ -394,7 +394,7 @@ void ShutterWaitForMotorStop(uint8_t i) { AddLog_P2(LOG_LEVEL_INFO, PSTR("SHT: Wait for Motorstop..")); if (Shutter.mode == SHT_OFF_ON__OPEN_CLOSE || Shutter.mode == SHT_OFF_ON__OPEN_CLOSE_STEPPER) { - if ( Shutter.mode = SHT_OFF_ON__OPEN_CLOSE_STEPPER) { + if ( Shutter.mode == SHT_OFF_ON__OPEN_CLOSE_STEPPER) { //AddLog_P2(LOG_LEVEL_INFO, PSTR("SHT: Frequency change %d"), Shutter.pwm_frequency); while (Shutter.pwm_frequency > 0) { Shutter.accelerator[i] = 0;