From 59fc1622dc1033c1e862ae9151597933998b46f6 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Fri, 15 Nov 2024 11:11:24 +0100 Subject: [PATCH] Hotfixes --- wash/src/wash/control/ControllerSpin.java | 3 ++- wash/src/wash/program/WashingProgram3.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wash/src/wash/control/ControllerSpin.java b/wash/src/wash/control/ControllerSpin.java index 5396334..1ad3e14 100644 --- a/wash/src/wash/control/ControllerSpin.java +++ b/wash/src/wash/control/ControllerSpin.java @@ -28,7 +28,8 @@ public final class ControllerSpin extends ActorThread { while (true) { try { temp = receiveWithTimeout(10000 / Settings.SPEEDUP); - elapsed = ((System.currentTimeMillis() - start) * (Settings.SPEEDUP) / 1000 * 60); + elapsed = ((System.currentTimeMillis() - start) * Settings.SPEEDUP) / (1000 * 60); + System.out.println(elapsed); // If there is a new message, swap if (temp != null) { diff --git a/wash/src/wash/program/WashingProgram3.java b/wash/src/wash/program/WashingProgram3.java index 79ee344..40ffd91 100644 --- a/wash/src/wash/program/WashingProgram3.java +++ b/wash/src/wash/program/WashingProgram3.java @@ -52,6 +52,9 @@ public final class WashingProgram3 extends ActorThread { water.send(new WashingMessage(this, WATER_DRAIN)); receive(); + water.send(new WashingMessage(this, WATER_IDLE)); + receive(); + // Unlock hatch io.lock(false);