Merge pull request #12941 from stefanbode/patch-10

Fixing WDT reset on shutters with stepper motors during deceleration #12849
This commit is contained in:
Theo Arends 2021-08-22 16:00:38 +02:00 committed by GitHub
commit 6b29c66e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1084,6 +1084,7 @@ void CmndShutterPosition(void)
}
int8_t new_shutterdirection = Shutter[index].real_position < Shutter[index].target_position ? 1 : -1;
if (Shutter[index].direction == -new_shutterdirection) {
Shutter[index].start_position = Shutter[index].target_position;
ShutterPowerOff(index);
}
if (Shutter[index].direction != new_shutterdirection) {