Merge pull request #13064 from stefanbode/patch-12

shutter: fixed stepper wrong position #12849 follow up
This commit is contained in:
Jason2866 2021-09-05 18:09:46 +02:00 committed by GitHub
commit 1e0c61091e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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