Allow tilt change with wall buttons

If venetian shutter is stopped before start moving the actual tilt is stored as new target tilt for further operations.
This commit is contained in:
stefanbode 2021-11-25 08:31:40 +01:00 committed by GitHub
parent 50ec8a541e
commit b56ff4dfa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -479,6 +479,10 @@ void ShutterPowerOff(uint8_t i)
if (Shutter[i].direction !=0) {
Shutter[i].direction = 0;
}
if (Shutter[i].real_position == Shutter[i].start_position) {
//AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Update target tilt shutter %d from %d to %d"), i+1, Shutter[i].tilt_target_pos , Shutter[i].tilt_real_pos);
Shutter[i].tilt_target_pos = Shutter[i].tilt_real_pos;
}
TasmotaGlobal.rules_flag.shutter_moved = 1;
switch (Shutter[i].switch_mode) {
case SHT_SWITCH: