From 01d8d10153d11cd064d3c7ace637bd9baac32bdb Mon Sep 17 00:00:00 2001 From: Olivier Date: Sat, 28 Nov 2020 10:41:16 +0100 Subject: [PATCH] RF24: Fix wrongly reported TX level (#1457) --- hal/transport/RF24/driver/RF24.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/transport/RF24/driver/RF24.cpp b/hal/transport/RF24/driver/RF24.cpp index 50c261521..38217b673 100644 --- a/hal/transport/RF24/driver/RF24.cpp +++ b/hal/transport/RF24/driver/RF24.cpp @@ -409,7 +409,7 @@ LOCAL int16_t RF24_getTxPowerLevel(void) LOCAL uint8_t RF24_getTxPowerPercent(void) { // report TX level in %, 0 (LOW) = 25%, 3 (MAX) = 100 - const uint8_t result = 25 + (((RF24_readByteRegister(RF24_REG_RF_SETUP) >> 2) & 3) * 25); + const uint8_t result = 25 + (((RF24_readByteRegister(RF24_REG_RF_SETUP) >> 1) & 3) * 25); return result; } LOCAL bool RF24_setTxPowerLevel(const uint8_t newPowerLevel)