From c7481610196641b48595a0752474a6932a57571b Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Fri, 15 Sep 2023 14:26:20 +0200 Subject: [PATCH] AbstractCompileDialog: keep clock interface This interface is required for calculating the next wakeup time for motes. --- .../org/contikios/cooja/dialogs/AbstractCompileDialog.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/org/contikios/cooja/dialogs/AbstractCompileDialog.java b/java/org/contikios/cooja/dialogs/AbstractCompileDialog.java index 1ae9ebb0a..c707e8e54 100644 --- a/java/org/contikios/cooja/dialogs/AbstractCompileDialog.java +++ b/java/org/contikios/cooja/dialogs/AbstractCompileDialog.java @@ -68,6 +68,7 @@ import org.contikios.cooja.Cooja; import org.contikios.cooja.MoteInterface; +import org.contikios.cooja.interfaces.Clock; import org.contikios.cooja.interfaces.MoteID; import org.contikios.cooja.interfaces.Position; import org.contikios.cooja.mote.BaseContikiMoteType; @@ -530,8 +531,10 @@ protected void addMoteInterface(Class intfClass, boolea } }); - /* Always select position and ID interface */ - if (Position.class.isAssignableFrom(intfClass) || MoteID.class.isAssignableFrom(intfClass)) { + // Always select clock, ID, and position interfaces. + if (Clock.class.isAssignableFrom(intfClass) || + MoteID.class.isAssignableFrom(intfClass) || + Position.class.isAssignableFrom(intfClass)) { intfCheckBox.setEnabled(false); intfCheckBox.setSelected(true); }