From e648373677389f2ad7a197c8a9240b5dd6d334c3 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Thu, 22 Sep 2016 10:54:21 +0200 Subject: [PATCH] Cooja now supports Wismote and Z1 motes when exporting simulations as executable JAR. --- .../org/contikios/cooja/util/ExecuteJAR.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/cooja/java/org/contikios/cooja/util/ExecuteJAR.java b/tools/cooja/java/org/contikios/cooja/util/ExecuteJAR.java index 57d1fb4f6..84d31ae46 100644 --- a/tools/cooja/java/org/contikios/cooja/util/ExecuteJAR.java +++ b/tools/cooja/java/org/contikios/cooja/util/ExecuteJAR.java @@ -222,13 +222,20 @@ public class ExecuteJAR { /* Check dependencies: mote type */ for (MoteType t: simulation.getMoteTypes()) { - if (!t.getClass().getName().contains("SkyMoteType")) { - throw new RuntimeException( - "You simulation contains the mote type: " + Cooja.getDescriptionOf(t.getClass()) + "\n" + - "Only the Sky Mote Type is currently supported.\n" - ); - } logger.info("Checking mote types: '" + Cooja.getDescriptionOf(t.getClass()) + "'"); + if (t.getClass().getName().endsWith("SkyMoteType")) { + continue; + } + if (t.getClass().getName().endsWith("WismoteMoteType")) { + continue; + } + if (t.getClass().getName().endsWith("Z1MoteType")) { + continue; + } + throw new RuntimeException( + "Your simulation contains the mote type: " + Cooja.getDescriptionOf(t.getClass()) + "\n" + + "Only the Sky, Wismote, and Z1 mote types are currently supported.\n" + ); } /* Check dependencies: Contiki Control Plugin */