From 9288f0864c2556c4aaeecb0fc4c1699f97721716 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sat, 8 Jun 2024 20:24:15 -0700 Subject: [PATCH] reviewed RF24Messh._make_contacts() --- circuitpython_nrf24l01/rf24_mesh.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/circuitpython_nrf24l01/rf24_mesh.py b/circuitpython_nrf24l01/rf24_mesh.py index a07982d..70e92ed 100644 --- a/circuitpython_nrf24l01/rf24_mesh.py +++ b/circuitpython_nrf24l01/rf24_mesh.py @@ -239,11 +239,7 @@ def _make_contact(self, lvl: int) -> List[int]: while time.monotonic_ns() < timeout and len(responders) < MESH_MAX_POLL: if self._net_update() == NETWORK_POLL: contacted = self.frame_buf.header.from_node - is_duplicate = False - for contact in responders: - if contacted == contact: - is_duplicate = True - if not is_duplicate: + if contacted not in responders: responders.append(contacted) return responders