From 106fc117253d9c18d6039a7d66f71c816d833300 Mon Sep 17 00:00:00 2001 From: Tiernan Date: Sun, 6 Aug 2023 01:24:24 +1000 Subject: [PATCH] Fixes failure to read picopass cards immediately after emulating. (#10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: あく --- picopass_worker.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/picopass_worker.c b/picopass_worker.c index 7a68b340738..a0aac623115 100644 --- a/picopass_worker.c +++ b/picopass_worker.c @@ -21,8 +21,8 @@ static const uint8_t loclass_csns[LOCLASS_NUM_CSNS][RFAL_PICOPASS_BLOCK_LEN] = { }; static void picopass_worker_enable_field() { - furi_hal_nfc_ll_txrx_on(); furi_hal_nfc_exit_sleep(); + furi_hal_nfc_ll_txrx_on(); furi_hal_nfc_ll_poll(); } @@ -1198,6 +1198,8 @@ static void picopass_emu_handle_packet( } void picopass_worker_emulate(PicopassWorker* picopass_worker, bool loclass_mode) { + furi_hal_nfc_exit_sleep(); + FuriHalNfcTxRxContext tx_rx = {}; PicopassEmulatorCtx emu_ctx = { .state = PicopassEmulatorStateIdle,