Fixed a bug with the ScriptRunner plugin
The ScriptRunner plugin started the simulation in GUI and NOGUI mode. Now the simulation is only started in nogui mode
This commit is contained in:
parent
f68bc3a40b
commit
6d61893e09
|
@ -1023,7 +1023,7 @@ public class Cooja extends Observable {
|
|||
|
||||
int pluginType = pluginClass.getAnnotation(PluginType.class).value();
|
||||
if (pluginType != PluginType.SIM_PLUGIN && pluginType != PluginType.SIM_STANDARD_PLUGIN
|
||||
&& pluginType == PluginType.SIM_CONTROL_PLUGIN) {
|
||||
&& pluginType != PluginType.SIM_CONTROL_PLUGIN) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -274,10 +274,14 @@ public class ScriptRunner extends VisPlugin {
|
|||
if (script != null) {
|
||||
updateScript(script);
|
||||
}
|
||||
|
||||
/* start simulation */
|
||||
simulation.setSpeedLimit(null);
|
||||
simulation.startSimulation();
|
||||
}
|
||||
|
||||
public void startPlugin() {
|
||||
/* start simulation */
|
||||
if (!Cooja.isVisualized()) {
|
||||
simulation.setSpeedLimit(null);
|
||||
simulation.startSimulation();
|
||||
}
|
||||
}
|
||||
|
||||
public void setLinkFile(File source) {
|
||||
|
|
Loading…
Reference in a new issue