Fixed DIV/0 (#20524)

This commit is contained in:
stefanbode 2024-01-17 10:03:42 +01:00 committed by GitHub
parent 5545c82e68
commit c705c8f89c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -687,7 +687,7 @@ void ShutterInit(void)
Shutter[i].min_realPositionChange = 0;
break;
case SHT_COUNTER:
Shutter[i].min_realPositionChange = SHT_DIV_ROUND(Shutter[i].min_realPositionChange, Shutter[i].motordelay);
Shutter[i].min_realPositionChange = SHT_DIV_ROUND(Shutter[i].min_realPositionChange, Shutter[i].motordelay > 0?Shutter[i].motordelay : 1);
break;
}