better fix on init (#17488)

try to avoid get  5000 if the init value is 65535. More focus on setting the standard of 500 on nearly any case
This commit is contained in:
stefanbode 2022-12-23 09:53:10 +01:00 committed by GitHub
parent 42e3862970
commit 0c588f2ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -402,7 +402,10 @@ void ShutterInit(void)
Settings->shutter_accuracy = 1;
Settings->shutter_mode = ShutterGlobal.position_mode;
// initialize MotorStop time with 500ms if not set
Settings->shutter_motorstop = (Settings->shutter_motorstop == 0) ? 500 : tmin(5000,Settings->shutter_motorstop);
// typical not set start values are 0 and 65535
if (Settings->shutter_motorstop > 5000 || Settings->shutter_motorstop == 0) {
Settings->shutter_motorstop = 500;
}
}
}