Small bugfix

Wallbuttons did not work after first use because shutter was in tilt mode.
up/down webbuttons did not stop the shutter correctly in tilt mode
This commit is contained in:
stefanbode 2021-11-24 09:34:51 +01:00 committed by GitHub
parent dfaaab195b
commit 95c94ff4f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -558,6 +558,8 @@ void ShutterUpdatePosition(void)
//AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Pre: Tilt not match %d -> %d, moving: %d"),Shutter[i].tilt_real_pos,Shutter[i].tilt_target_pos,Shutter[i].tiltmoving);
if (abs(Shutter[i].tilt_real_pos - Shutter[i].tilt_target_pos) > Shutter[i].min_TiltChange && Shutter[i].tiltmoving == 0) {
AddLog(LOG_LEVEL_INFO, PSTR("SHT: Tilt not match %d -> %d"),Shutter[i].tilt_real_pos,Shutter[i].tilt_target_pos);
char databuf[1] = "";
XdrvMailbox.data = databuf;
XdrvMailbox.payload = -99;
XdrvMailbox.index = i+1;
Shutter[i].tiltmoving = 1;
@ -718,6 +720,9 @@ void ShutterRelayChanged(void)
}
switch (ShutterGlobal.position_mode) {
// enum Shutterposition_mode {SHT_TIME, SHT_TIME_UP_DOWN, SHT_TIME_GARAGE, SHT_COUNTER, SHT_PWM_VALUE, SHT_PWM_TIME,};
if (powerstate_local > 0) {
Shutter[i].tiltmoving = 0;
}
case SHT_TIME_UP_DOWN:
case SHT_COUNTER:
case SHT_PWM_VALUE: