From becd2d4e158d7fe85509b11acff3173796c6acfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20=27Morty=27=20Str=C3=BCbe?= Date: Tue, 30 Oct 2012 11:41:55 +0100 Subject: [PATCH] Cooja: Load whole simulation before executing it in nogui mode --- tools/cooja/java/se/sics/cooja/GUI.java | 6 +++--- tools/cooja/java/se/sics/cooja/plugins/ScriptRunner.java | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/GUI.java b/tools/cooja/java/se/sics/cooja/GUI.java index d966685b9..9fdabc42f 100644 --- a/tools/cooja/java/se/sics/cooja/GUI.java +++ b/tools/cooja/java/se/sics/cooja/GUI.java @@ -3227,14 +3227,14 @@ public class GUI extends Observable { logger.fatal("Error: " + e.getMessage(), e); System.exit(1); } - sim.setSpeedLimit(null); - sim.startSimulation(); } else { logger.fatal("No test editor controlling simulation, aborting"); System.exit(1); } } - + sim.setSpeedLimit(null); + sim.startSimulation(); + } else if (args.length > 0 && args[0].startsWith("-applet")) { String tmpWebPath=null, tmpBuildPath=null, tmpEsbFirmware=null, tmpSkyFirmware=null; diff --git a/tools/cooja/java/se/sics/cooja/plugins/ScriptRunner.java b/tools/cooja/java/se/sics/cooja/plugins/ScriptRunner.java index 93e5e7fb4..fd3084e7d 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/ScriptRunner.java +++ b/tools/cooja/java/se/sics/cooja/plugins/ScriptRunner.java @@ -672,8 +672,6 @@ public class ScriptRunner extends VisPlugin { } catch (Exception e) { logger.fatal("Error: " + e.getMessage(), e); } - simulation.setSpeedLimit(null); - simulation.startSimulation(); } return true; }