Prechádzať zdrojové kódy

Fixes old FloatSensor Bug

Infinite loop on time = 0, otherwise exponentially increasing intervals
instead of every 10 seconds.
Andreas T. Meyer-Berg 3 rokov pred
rodič
commit
2303e1e205

+ 1 - 1
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/devices/FloatSensorDevice.java

@@ -120,7 +120,7 @@ public class FloatSensorDevice extends SmartDevice implements FloatSensor, Sched
 	public void simulateEvent(long time) {
 		updateData();
 		//Update again in 10 seconds
-		nextSimulationTime=time *10000;
+		nextSimulationTime=time + 10000;
 		SimulationManager.scheduleEvent(this);
 	}