From 9d27b181c1c2ca9839cd3e8c8ae20f96f1bd73a9 Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Sun, 5 Oct 2014 00:38:49 +0200 Subject: [PATCH] [cooja/mspsim] Msp802154Radio: Fix maximum power indicator Previously getOutputPowerIndicatorMax() returned the fixed value 31. This is valid for e.g. the mspsim CC2420 radio implementation but not for the CC2520 implementation where the maximum returned value is 9. Thus to fix transmission range issues (for example for Wismote node) the maxium value provided by the radio implementaiton must be used. --- .../org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cooja/apps/mspsim/src/org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java b/tools/cooja/apps/mspsim/src/org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java index 2effa50d7..18dcffb37 100644 --- a/tools/cooja/apps/mspsim/src/org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java +++ b/tools/cooja/apps/mspsim/src/org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java @@ -332,7 +332,7 @@ public class Msp802154Radio extends Radio implements CustomDataRadio { } public int getOutputPowerIndicatorMax() { - return 31; + return radio.getOutputPowerIndicatorMax(); } /**