Fix shutter restart (#23939)

This commit is contained in:
SteWers 2025-09-23 14:28:54 +02:00 committed by GitHub
parent c95063a56b
commit fc789eb6b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -1383,8 +1383,7 @@ void ShutterUpdateVelocity(uint8_t i)
void ShutterWaitForMotorStart(uint8_t i)
{
uint32_t end_time = Shutter[i].last_stop_time + ShutterSettings.shutter_motorstop;
while (!TimeReached(end_time)) {
while (millis() - Shutter[i].last_stop_time < ShutterSettings.shutter_motorstop) { // statement is overflow proof
loop();
}
//AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Stoptime done"));

View File

@ -656,8 +656,7 @@ void ShutterWaitForMotorStop(uint8_t i)
void ShutterWaitForMotorStart(uint8_t i)
{
uint32_t end_time = Shutter[i].last_stop_time + Settings->shutter_motorstop;
while (!TimeReached(end_time)) {
while (millis() - Shutter[i].last_stop_time < Settings->shutter_motorstop) { // statement is overflow proof
loop();
}
//AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Stoptime done"));