jpbarraca / pynrf24

Python port of the RF24 library for NRF24L01+ radios.
GNU General Public License v2.0
152 stars 84 forks source link

Bug in read() method #16

Closed arthurxie closed 8 years ago

arthurxie commented 9 years ago

The RX_EMPTY is a shift count not a mask

return self.read_register(NRF24.FIFO_STATUS) & NRF24.RX_EMPTY

should be

return self.read_register(NRF24.FIFO_STATUS) & (1 << NRF24.RX_EMPTY)
jpbarraca commented 8 years ago

Thanks. Corrected.