From 5660d6c16832c30f8334ab9070faf0d196c6069c Mon Sep 17 00:00:00 2001 From: fros4943 Date: Mon, 7 Dec 2009 12:31:19 +0000 Subject: [PATCH] bugfix: returned radio on during boot --- .../se/sics/cooja/mspmote/interfaces/SkyByteRadio.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/SkyByteRadio.java b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/SkyByteRadio.java index 16e56f6b2..204c4fca9 100755 --- a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/SkyByteRadio.java +++ b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/SkyByteRadio.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: SkyByteRadio.java,v 1.18 2009/12/02 16:29:36 fros4943 Exp $ + * $Id: SkyByteRadio.java,v 1.19 2009/12/07 12:31:19 fros4943 Exp $ */ package se.sics.cooja.mspmote.interfaces; @@ -436,6 +436,12 @@ public class SkyByteRadio extends Radio implements CustomDataRadio { } public boolean isReceiverOn() { - return mote.skyNode.radio.getMode() != CC2420.MODE_TXRX_OFF; + if (mote.skyNode.radio.getMode() == CC2420.MODE_POWER_OFF) { + return false; + } + if (mote.skyNode.radio.getMode() == CC2420.MODE_TXRX_OFF) { + return false; + } + return true; } }