From ca8425d7bfeaea2cc0862ff98d6f2addff797390 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Sat, 31 Oct 2020 01:23:51 +0800 Subject: [PATCH] [cc2538] fix a typo in energy scan (#5748) --- examples/platforms/cc2538/radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/platforms/cc2538/radio.c b/examples/platforms/cc2538/radio.c index f93366ab5..a8bbd99e7 100644 --- a/examples/platforms/cc2538/radio.c +++ b/examples/platforms/cc2538/radio.c @@ -630,7 +630,7 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance) { rssi = HWREG(RFCORE_XREG_RSSI) & 0xff; - if (rssi <= cc2538RadioGetRssiOffset() - 128) + if (rssi > cc2538RadioGetRssiOffset() - 128) { rssi -= cc2538RadioGetRssiOffset(); }