Skip to content

refactor!: replace open_tx_pipe() with as_tx(Option<address>)#41

Merged
2bndy5 merged 9 commits intomainfrom
tx-pipe0-cache
May 4, 2025
Merged

refactor!: replace open_tx_pipe() with as_tx(Option<address>)#41
2bndy5 merged 9 commits intomainfrom
tx-pipe0-cache

Conversation

@2bndy5
Copy link
Member

@2bndy5 2bndy5 commented May 1, 2025

This replaces the open_tx_pipe() by letting as_tx() accept an optional TX address.

The intention is to satisfy a bug where using pipe 0 in RX mode prevents the TX address from being persistent when switch from RX to TX modes.

Bug was raised in nRF24/RF24#1028.
The solution is to cache the TX address internally, but this ended up invalidating the traditional order for radio setup. Removing open_tx_pipe() leaves less public API surface to cause problems.

@codecov
Copy link

codecov bot commented May 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (72fe862) to head (0aaddce).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #41   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         3175      3250   +75     
=========================================
+ Hits          3175      3250   +75     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@2bndy5 2bndy5 force-pushed the tx-pipe0-cache branch from 0410c62 to 1dcbba5 Compare May 1, 2025 10:49
2bndy5 added 5 commits May 2, 2025 11:17
This replaces the `open_tx_pipe()` by letting `as_tx()` accept an optional TX address.

The intention is to satisfy a bug where using pipe 0 in RX mode prevents the TX address from being persistent when switch from RX to TX modes.

Bug was raised in nRF24/RF24#1028.
The solution is to cache the TX address internally, but this ended up invalidating the traditional order for radio setup. Removing `open_tx_pipe()` leaves less public API surface to cause problems.
adjust tests for
- init()
- with_config()
- open_rx_pipe()
- set_payload_length()

reduce SPI transactions in with_config()
@2bndy5 2bndy5 force-pushed the tx-pipe0-cache branch from d900516 to 1d0e3d6 Compare May 2, 2025 18:23
@2bndy5 2bndy5 merged commit 9baaf57 into main May 4, 2025
43 checks passed
@2bndy5 2bndy5 deleted the tx-pipe0-cache branch May 4, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant