Skip to content

Commit

Permalink
Do not set PA level on begin
Browse files Browse the repository at this point in the history
See nRF24/RF24Mesh#210
To allow users to configure the PA level in higher layers of the stack, do not set PA level in radio.begin();.
  • Loading branch information
TMRh20 committed Sep 11, 2022
1 parent 0bb5af4 commit 8ad2886
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions RF24.cpp
Expand Up @@ -1082,10 +1082,8 @@ bool RF24::_init_radio()
// sizes must never be used. See datasheet for a more complete explanation.
setRetries(5, 15);

// Then set the data rate to the slowest (and most reliable) speed supported by all
// hardware. Since this value occupies the same register as the PA level value, set
// the PA level to MAX
setRadiation(RF24_PA_MAX, RF24_1MBPS); // LNA enabled by default
// Then set the data rate to the slowest (and most reliable) speed supported by all hardware.
setDataRate(RF24_1MBPS);

// detect if is a plus variant & use old toggle features command accordingly
uint8_t before_toggle = read_register(FEATURE);
Expand Down

0 comments on commit 8ad2886

Please sign in to comment.