fix pump test progress bar
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user