RF24 reports that 50% TX Powerlevel is used with RF24_PA_MAX
joro75 opened this issue · comments
John de Rooij commented
When MY_SIGNAL_REPORT_ENABLED is defined, the Transmit power percentage (SR_TX_POWER_PERCENT) can be requested.
When the powerlevel of the RF24 is set to RF24_PA_MAX (which is the maximum), 50% is returned.
This is not correct, and also doesn't match with the Power level that can be requested (SR_TX_POWER_LEVEL), which is correctly reported as 0 dBm (which is the maximum).
This is caused by a wrong shift of the RF_SETUP register on line 412 of RF24.cpp (
MySensors/hal/transport/RF24/driver/RF24.cpp
Line 412 in 8f1f8ad
The right shift shouldn't be 2 but it should be a right shift of 1, as it is used on line 406.
John de Rooij commented
@tekka007 Not a problem. Thanks for fixing!