Skip to content

Commit

Permalink
use all poll responses in mesh request_address()
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jun 8, 2024
1 parent 1118da8 commit 8818abc
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions circuitpython_nrf24l01/rf24_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,17 @@ def _get_level(address: int) -> int:
break
if callable(self.block_less_callback):
self.block_less_callback()
if new_addr is None:
return False
super()._begin(new_addr)
# print("new address assigned:", oct(new_addr))
# do a double check as a manual retry in lack of using auto-ack
if self.lookup_node_id(self._addr) != self._id:
if new_addr is None:
continue
super()._begin(new_addr)

Check warning on line 219 in circuitpython_nrf24l01/rf24_mesh.py

View check run for this annotation

Codecov / codecov/patch

circuitpython_nrf24l01/rf24_mesh.py#L217-L219

Added lines #L217 - L219 were not covered by tests
# print("new address assigned:", oct(new_addr))
# do a double check as a manual retry in lack of using auto-ack
if self.lookup_node_id(self._addr) != self._id:
super()._begin(NETWORK_DEFAULT_ADDR)
return False
return True
if self.lookup_node_id(self._addr) != self._id:
super()._begin(NETWORK_DEFAULT_ADDR)
continue
return True
return False

Check warning on line 227 in circuitpython_nrf24l01/rf24_mesh.py

View check run for this annotation

Codecov / codecov/patch

circuitpython_nrf24l01/rf24_mesh.py#L223-L227

Added lines #L223 - L227 were not covered by tests

def _make_contact(self, lvl: int) -> List[int]:
"""Make a list of connections after multicasting a `NETWORK_POLL` message."""
Expand Down

0 comments on commit 8818abc

Please sign in to comment.