Display Mifare Classic data in NFC app (#2389)

* Add data display for Mifare Classic cards.
* Clean up log statements and data display.

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Liam Hays
2023-02-21 00:15:48 -07:00
committed by GitHub
parent 0a3ff7f85a
commit 663eb6cd6d
4 changed files with 114 additions and 1 deletions

View File

@@ -14,7 +14,8 @@ void nfc_scene_nfc_data_info_on_enter(void* context) {
NfcDeviceData* dev_data = &nfc->dev->dev_data;
NfcProtocol protocol = dev_data->protocol;
uint8_t text_scroll_height = 0;
if((protocol == NfcDeviceProtocolMifareDesfire) || (protocol == NfcDeviceProtocolMifareUl)) {
if((protocol == NfcDeviceProtocolMifareDesfire) || (protocol == NfcDeviceProtocolMifareUl) ||
(protocol == NfcDeviceProtocolMifareClassic)) {
widget_add_button_element(
widget, GuiButtonTypeRight, "More", nfc_scene_nfc_data_info_widget_callback, nfc);
text_scroll_height = 52;
@@ -136,6 +137,9 @@ bool nfc_scene_nfc_data_info_on_event(void* context, SceneManagerEvent event) {
} else if(protocol == NfcDeviceProtocolMifareUl) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightData);
consumed = true;
} else if(protocol == NfcDeviceProtocolMifareClassic) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicData);
consumed = true;
}
}
}