Skip to content

Commit

Permalink
RF24: Fix wrongly reported TX level (#1457)
Browse files Browse the repository at this point in the history
  • Loading branch information
tekka007 authored Nov 28, 2020
1 parent 8f1f8ad commit 01d8d10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hal/transport/RF24/driver/RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 01d8d10

Please sign in to comment.