nRF24 / CircuitPython_nRF24L01

CircuitPython driver library for the nRF24L01 transceiver.
http://circuitpython-nrf24l01.rtfd.io/
MIT License
45 stars 11 forks source link

Network improvements #59

Open 2bndy5 opened 2 months ago

2bndy5 commented 2 months ago

This ports changes from the following recent PRs to the pure python codebase:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 25.49020% with 38 lines in your changes missing coverage. Please review.

Project coverage is 86.27%. Comparing base (fc69216) to head (492de7d).

Files Patch % Lines
circuitpython_nrf24l01/rf24_mesh.py 18.18% 36 Missing :warning:
circuitpython_nrf24l01/rf24.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #59 +/- ## ========================================== - Coverage 86.68% 86.27% -0.42% ========================================== Files 16 16 Lines 2463 2484 +21 ========================================== + Hits 2135 2143 +8 - Misses 328 341 +13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

2bndy5 commented 2 months ago

I think the bug fixed in nRF24/RF24Network#229 is specific to the C++ implementation. Looking at the _write_to_pipe(), I forgot how much code gulf I played to speed things up.

There is no RF24Network.networkFlags here because

Furthermore, the network layers here don''t use a writefast() equivalent. Instead, I use a regular blocking write() (RF24.send()) and call RF24Network._tx_standby() which uses RF24.resend() similarly to how C++ RF24::txStandBy() uses RF24::reUseTx() but in a blocking manner.