mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-08-15 12:27:50 +00:00
bug fix: signal strenghts may not be registered
This commit is contained in:
@@ -383,10 +383,16 @@ public class MRM extends AbstractRadioMedium {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public double getDestinationSignalStrength(Radio radio) {
|
public double getDestinationSignalStrength(Radio radio) {
|
||||||
|
if (signalStrengths.get(radio) == null) {
|
||||||
|
return Double.MIN_VALUE;
|
||||||
|
}
|
||||||
return signalStrengths.get(radio);
|
return signalStrengths.get(radio);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getInterferenceSignalStrength(Radio radio) {
|
public double getInterferenceSignalStrength(Radio radio) {
|
||||||
|
if (signalStrengths.get(radio) == null) {
|
||||||
|
return Double.MIN_VALUE;
|
||||||
|
}
|
||||||
return signalStrengths.get(radio);
|
return signalStrengths.get(radio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user