mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 23:07:17 +00:00
Merge pull request #7364 from stefanbode/patch-9
Fixed infinite loop bug
This commit is contained in:
commit
d627de5d76
@ -188,7 +188,7 @@ void ShutterInit(void)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Shutter.mode = SHT_OFF_ON__OPEN_CLOSE;
|
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.mode = SHT_OFF_ON__OPEN_CLOSE_STEPPER;
|
||||||
Shutter.pwm_frequency = 0;
|
Shutter.pwm_frequency = 0;
|
||||||
analogWriteFreq(Shutter.pwm_frequency);
|
analogWriteFreq(Shutter.pwm_frequency);
|
||||||
@ -394,7 +394,7 @@ void ShutterWaitForMotorStop(uint8_t i)
|
|||||||
{
|
{
|
||||||
AddLog_P2(LOG_LEVEL_INFO, PSTR("SHT: Wait for Motorstop.."));
|
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 || 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);
|
//AddLog_P2(LOG_LEVEL_INFO, PSTR("SHT: Frequency change %d"), Shutter.pwm_frequency);
|
||||||
while (Shutter.pwm_frequency > 0) {
|
while (Shutter.pwm_frequency > 0) {
|
||||||
Shutter.accelerator[i] = 0;
|
Shutter.accelerator[i] = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user