fix(web): reveal NFC peripherals after detection
This commit is contained in:
@@ -167,6 +167,7 @@ class NfcExtensionToyPublisher:
|
||||
"active_catalog_revision": None,
|
||||
"active_extension_names": [],
|
||||
"active_target_scopes": [],
|
||||
"detected_nfc_ids": [],
|
||||
"message_count": 0,
|
||||
"burst_frame_attempt_count": 0,
|
||||
"burst_publish_attempt_count": 0,
|
||||
@@ -192,6 +193,7 @@ class NfcExtensionToyPublisher:
|
||||
active_catalog_revision=None,
|
||||
active_extension_names=[],
|
||||
active_target_scopes=[],
|
||||
detected_nfc_ids=[],
|
||||
message_count=0,
|
||||
last_error=None,
|
||||
)
|
||||
@@ -214,6 +216,7 @@ class NfcExtensionToyPublisher:
|
||||
active_catalog_revision=None,
|
||||
active_extension_names=[],
|
||||
active_target_scopes=[],
|
||||
detected_nfc_ids=[],
|
||||
message_count=0,
|
||||
)
|
||||
|
||||
@@ -346,6 +349,14 @@ class NfcExtensionToyPublisher:
|
||||
self._stop.wait(self.poll_interval_s)
|
||||
continue
|
||||
|
||||
if card_uid:
|
||||
with self._lock:
|
||||
detected_nfc_ids = list(self._status["detected_nfc_ids"])
|
||||
if card_uid not in detected_nfc_ids:
|
||||
self._set_status(
|
||||
detected_nfc_ids=[*detected_nfc_ids, card_uid],
|
||||
)
|
||||
|
||||
try:
|
||||
catalog_revision = self._catalog_revision() if card_uid else ""
|
||||
except Exception as exc: # noqa: BLE001 - retry while the card remains
|
||||
|
||||
Reference in New Issue
Block a user