Commit 8ff9fb6f authored by TMRh20's avatar TMRh20

Small fix before pushing last commit

- fixed mistake with changes to setPALevel prior to pushing
parent c965f738
...@@ -1019,12 +1019,17 @@ bool RF24::testRPD(void) ...@@ -1019,12 +1019,17 @@ bool RF24::testRPD(void)
void RF24::setPALevel(uint8_t level) void RF24::setPALevel(uint8_t level)
{ {
uint8_t setup = read_register(RF_SETUP) & 0b11111000;
if(level > 3){ // If invalid level, go to max PA if(level > 3){ // If invalid level, go to max PA
level = RF24_PA_MAX << 1 + 1; // +1 to support the SI24R1 chip extra bit level = RF24_PA_MAX << 1 + 1; // +1 to support the SI24R1 chip extra bit
}else{ }else{
level = (level << 1) + 1; // Else set level as requested level = (level << 1) + 1; // Else set level as requested
} }
write_register( RF_SETUP, level ) ; // Write it to the chip
write_register( RF_SETUP, setup |= level ) ; // Write it to the chip
} }
/****************************************************************************/ /****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment