Fix bug introduced in the move to PROGMEM. Props to @basilrx for finding this. Also added a test case to demonstrate the bug, and guard against more like it in the future.
This commit is contained in:
2
RF24.cpp
2
RF24.cpp
@@ -649,7 +649,7 @@ void RF24::openReadingPipe(uint8_t child, uint64_t address)
|
||||
// Note it would be more efficient to set all of the bits for all open
|
||||
// pipes at once. However, I thought it would make the calling code
|
||||
// more simple to do it this way.
|
||||
write_register(EN_RXADDR,read_register(EN_RXADDR) | _BV(child_pipe_enable[child]));
|
||||
write_register(EN_RXADDR,read_register(EN_RXADDR) | _BV(pgm_read_byte(&child_pipe_enable[child])));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user