From 05bf2eec2ad5b597de5824025e200004a67f1b66 Mon Sep 17 00:00:00 2001 From: Abhijith Chatra Date: Tue, 15 Oct 2019 15:36:25 -0700 Subject: [PATCH] Fixing signal strength (#2474) --- libs/radio/radio.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/radio/radio.cpp b/libs/radio/radio.cpp index e362cbdb..6135769d 100644 --- a/libs/radio/radio.cpp +++ b/libs/radio/radio.cpp @@ -6,7 +6,6 @@ using namespace pxt; namespace radio { bool radioEnabled = false; - PacketBuffer packet; int radioEnable() { int r = uBit.radio.enable(); @@ -81,8 +80,8 @@ namespace radio { //% blockId=radio_datagram_rssi block="radio received signal strength" //% deprecated=true int receivedSignalStrength() { - if (radioEnable() != MICROBIT_OK || packet == NULL) return 0; - return packet.getRSSI(); + if (radioEnable() != MICROBIT_OK) return 0; + return uBit.radio.getRSSI(); } /**