diff --git a/Software/MainBoard/rust/src_webpack/src/main.ts b/Software/MainBoard/rust/src_webpack/src/main.ts index 996ca2d..5f86e1b 100644 --- a/Software/MainBoard/rust/src_webpack/src/main.ts +++ b/Software/MainBoard/rust/src_webpack/src/main.ts @@ -311,8 +311,11 @@ export class Controller { } testPlant(plantId: number) { + const plantConfig = controller.getConfig().plants[plantId]; + const pumpTimeS = plantConfig.pump_time_s; + let counter = 0 - let limit = 30 + let limit = pumpTimeS > 0 ? Math.ceil(pumpTimeS) : 30 controller.progressview.addProgress("test_pump", counter / limit * 100, "Testing pump " + (plantId + 1) + " for " + (limit - counter) + "s") let timerId: string | number | NodeJS.Timeout | undefined