From 1a56ce77e251058ccb02baff724ef644db9e4af5 Mon Sep 17 00:00:00 2001 From: RebornedBrain Date: Thu, 14 Dec 2023 13:05:17 +0300 Subject: [PATCH] CardDetected event now also triggers on_event callback --- .../main/nfc/helpers/protocol_support/nfc_protocol_support.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/applications/main/nfc/helpers/protocol_support/nfc_protocol_support.c b/applications/main/nfc/helpers/protocol_support/nfc_protocol_support.c index eb34722bc..390068a06 100644 --- a/applications/main/nfc/helpers/protocol_support/nfc_protocol_support.c +++ b/applications/main/nfc/helpers/protocol_support/nfc_protocol_support.c @@ -197,6 +197,10 @@ static bool nfc_protocol_support_scene_read_on_event(NfcApp* instance, SceneMana instance->scene_manager, NfcSceneDetect); } consumed = true; + } else if(event.event == NfcCustomEventCardDetected) { + const NfcProtocol protocol = + instance->protocols_detected[instance->protocols_detected_selected_idx]; + consumed = nfc_protocol_support[protocol]->scene_read.on_event(instance, event.event); } } else if(event.type == SceneManagerEventTypeBack) { nfc_poller_stop(instance->poller);