[FL-3678] NFC UI refactor (#3382)

* Added new image DolphinSaved_113x58.png for all "saved" pages

* New image DolphinDone_80x58.png added

* Replaced dolphins on all scenes accroding to new UI specs

* New success dolphin image added

* Success scene image replaced

* Changed image and text for update initial scene

* Image and text adjusted for "Original restored" scene

* Removed old DolphinNice_96x59.png image

* New image for LFRFID scene

* Removed unused image

* New UI image added to assets

* Replaced warning dolphin on mf_classic write initial fail scene

* Removed old image

* Changed image on scenes to a new one

* New dolphin mafia image

* Replaced dolphin mafia image to a new one

* Removed DolphinMafia_115x62.png

* New check symbol on completed state for detect_reader

* Adjusted layout elements position

* Removed second switching to popup view in order to achieve control in support callbacks

In general now we show generic scene and after that in on_enter callback we can redefine it for particular protocol

* CardDetected event now also triggers on_event callback

* Now on AuthRequest we throw CardDetected custom event

* Added callback for read_on_event

* Now we show different screen while reading and unlocking

* Fixed missing asstes for some scenes

* Update DolphinMafia_119x62.png

* Adjusted all the scenes with DolphinMafia image

* Scenes with save image adjusted

* Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_113x58.png

* All common dolphins moved to Dolphin folder

* Moved DolphinReadingSuccess_59x63.png to Dolphin folder

* Set proper led color for detect and read scenes

* Added new notification sequence for semi_success results

* Use new sequence for semi_success nfc reads

* Different events are now throwed depending on read result

* Added handling of incomplete event for ultralight cards

* Replaced image for iButton scene

* Updated API for f18

* Fixed issue with unlock retry sequence

* Fix after review

* Success notification replaced to semi success in case of incomplete mf classic reading

* New text for read scene

* New read result sound notification logic for mf classic cards

* Change MIFARE name accroding to new requirements

* New QR code image for MFKey app

* Update nfc_scene_mf_classic_mfkey_complete.c scene according to new UI requirements

* Update detect_reader.c and check_big_20x17.png

* New nfc save confirm scene added

* Implemented new flow for 'Detect Reader button' after partial mf classic read according to new UI

* UID for 15693 tags now shown on the new line

* Fix nfc unit tests

* Revert "Fix nfc unit tests"

This reverts commit 685ed6bfad.

* Rolled back all Mifare renamings in library files

* Revert "Change MIFARE name accroding to new requirements"

This reverts commit cfb974dc1f.

* Now Mifare word is changed only on the app level without changes to lib level

* Filename or "Unsaved + CardType" is now showed for saved cards during emulation

* Headers added to Write scenes

* Reordered menu items accrding to new spec

* Filename will be printed for saved tag in info scene

* New info render format for 14443_3a cards

* New info render format for 14443_3b cards

* New info render format for 14443_4a cards

* New info render format for iso15693 cards.

Also More_Info scene added to display Memory data

* New info render format for slix cards.

Also More_Info scene added to display Memory data

* Fixed "Mifare" word for desfire cards

* Aligned text and replaced dolphin image on emulate scene

* Fixed Mifare caption after QA

* Realigned emulation scene and fixed replaced Mifare to MIFARE

---------

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
RebornedBrain 2024-02-06 20:57:06 +03:00 committed by GitHub
parent a83e421d71
commit 9a77dbec56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 126 additions and 47 deletions

View File

@ -13,6 +13,7 @@ static void nfc_scene_info_on_enter_felica(NfcApp* instance) {
const FelicaData* data = nfc_device_get_data(device, NfcProtocolFelica);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_felica_info(data, NfcProtocolFormatTypeFull, temp_str);

View File

@ -13,6 +13,8 @@ static void nfc_scene_info_on_enter_iso14443_3a(NfcApp* instance) {
const Iso14443_3aData* data = nfc_device_get_data(device, NfcProtocolIso14443_3a);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_iso14443_3a_info(data, NfcProtocolFormatTypeFull, temp_str);

View File

@ -6,13 +6,17 @@ void nfc_render_iso14443_3a_format_bytes(FuriString* str, const uint8_t* const d
}
}
void nfc_render_iso14443_tech_type(const Iso14443_3aData* data, FuriString* str) {
const char iso_type = iso14443_3a_supports_iso14443_4(data) ? '4' : '3';
furi_string_cat_printf(str, "Tech: ISO 14443-%c (NFC-A)\n", iso_type);
}
void nfc_render_iso14443_3a_info(
const Iso14443_3aData* data,
NfcProtocolFormatType format_type,
FuriString* str) {
if(format_type == NfcProtocolFormatTypeFull) {
const char iso_type = iso14443_3a_supports_iso14443_4(data) ? '4' : '3';
furi_string_cat_printf(str, "ISO 14443-%c (NFC-A)\n", iso_type);
nfc_render_iso14443_tech_type(data, str);
}
nfc_render_iso14443_3a_brief(data, str);
@ -30,5 +34,5 @@ void nfc_render_iso14443_3a_brief(const Iso14443_3aData* data, FuriString* str)
void nfc_render_iso14443_3a_extra(const Iso14443_3aData* data, FuriString* str) {
furi_string_cat_printf(str, "\nATQA: %02X %02X ", data->atqa[1], data->atqa[0]);
furi_string_cat_printf(str, "SAK: %02X", data->sak);
furi_string_cat_printf(str, "\nSAK: %02X", data->sak);
}

View File

@ -9,6 +9,8 @@ void nfc_render_iso14443_3a_info(
NfcProtocolFormatType format_type,
FuriString* str);
void nfc_render_iso14443_tech_type(const Iso14443_3aData* data, FuriString* str);
void nfc_render_iso14443_3a_format_bytes(FuriString* str, const uint8_t* const data, size_t size);
void nfc_render_iso14443_3a_brief(const Iso14443_3aData* data, FuriString* str);

View File

@ -13,6 +13,7 @@ static void nfc_scene_info_on_enter_iso14443_3b(NfcApp* instance) {
const Iso14443_3bData* data = nfc_device_get_data(device, NfcProtocolIso14443_3b);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_iso14443_3b_info(data, NfcProtocolFormatTypeFull, temp_str);

View File

@ -6,7 +6,7 @@ void nfc_render_iso14443_3b_info(
FuriString* str) {
if(format_type == NfcProtocolFormatTypeFull) {
const char iso_type = iso14443_3b_supports_iso14443_4(data) ? '4' : '3';
furi_string_cat_printf(str, "ISO 14443-%c (NFC-B)\n", iso_type);
furi_string_cat_printf(str, "Tech: ISO 14443-%c (NFC-B)\n", iso_type);
}
furi_string_cat_printf(str, "UID:");
@ -20,7 +20,7 @@ void nfc_render_iso14443_3b_info(
if(format_type != NfcProtocolFormatTypeFull) return;
furi_string_cat_printf(str, "\n\e#Protocol info\n");
furi_string_cat_printf(str, "\n::::::::::::::::[Protocol info]:::::::::::::::\n");
if(iso14443_3b_supports_bit_rate(data, Iso14443_3bBitRateBoth106Kbit)) {
furi_string_cat(str, "Bit rate PICC <-> PCD:\n 106 kBit/s supported\n");
@ -68,7 +68,7 @@ void nfc_render_iso14443_3b_info(
iso14443_3b_supports_frame_option(data, Iso14443_3bFrameOptionCid) ? "" : "not ";
furi_string_cat_printf(str, "CID: %ssupported", cid_support_str);
furi_string_cat_printf(str, "\n\e#Application data\nRaw:");
furi_string_cat_printf(str, "\n::::::::::::[Application data]::::::::::::\nRaw:");
size_t app_data_size;
const uint8_t* app_data = iso14443_3b_get_application_data(data, &app_data_size);

View File

@ -14,6 +14,7 @@ static void nfc_scene_info_on_enter_iso14443_4a(NfcApp* instance) {
const Iso14443_4aData* data = nfc_device_get_data(device, NfcProtocolIso14443_4a);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_iso14443_4a_info(data, NfcProtocolFormatTypeFull, temp_str);

View File

@ -14,11 +14,12 @@ void nfc_render_iso14443_4a_info(
}
void nfc_render_iso14443_4a_brief(const Iso14443_4aData* data, FuriString* str) {
nfc_render_iso14443_tech_type(iso14443_4a_get_base_data(data), str);
nfc_render_iso14443_3a_brief(iso14443_4a_get_base_data(data), str);
}
void nfc_render_iso14443_4a_extra(const Iso14443_4aData* data, FuriString* str) {
furi_string_cat_printf(str, "\n\e#Protocol info\n");
furi_string_cat_printf(str, "\n::::::::::::::::[Protocol info]:::::::::::::::\n");
if(iso14443_4a_supports_bit_rate(data, Iso14443_4aBitRateBoth106Kbit)) {
furi_string_cat(str, "Bit rate PICC <-> PCD:\n 106 kBit/s supported\n");
@ -72,7 +73,7 @@ void nfc_render_iso14443_4a_extra(const Iso14443_4aData* data, FuriString* str)
const uint8_t* hist_bytes = iso14443_4a_get_historical_bytes(data, &hist_bytes_count);
if(hist_bytes_count > 0) {
furi_string_cat_printf(str, "\n\e#Historical bytes\nRaw:");
furi_string_cat_printf(str, "\n:::::::::::::[Historical bytes]:::::::::::::\nRaw:");
for(size_t i = 0; i < hist_bytes_count; ++i) {
furi_string_cat_printf(str, " %02X", hist_bytes[i]);

View File

@ -14,6 +14,7 @@ static void nfc_scene_info_on_enter_iso14443_4b(NfcApp* instance) {
const Iso14443_4bData* data = nfc_device_get_data(device, NfcProtocolIso14443_4b);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_iso14443_4b_info(data, NfcProtocolFormatTypeFull, temp_str);

View File

@ -14,16 +14,30 @@ static void nfc_scene_info_on_enter_iso15693_3(NfcApp* instance) {
const Iso15693_3Data* data = nfc_device_get_data(device, NfcProtocolIso15693_3);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_iso15693_3_info(data, NfcProtocolFormatTypeFull, temp_str);
widget_reset(instance->widget);
widget_add_text_scroll_element(
instance->widget, 0, 0, 128, 64, furi_string_get_cstr(temp_str));
furi_string_free(temp_str);
}
static void nfc_scene_more_info_on_enter_iso15693_3(NfcApp* instance) {
const NfcDevice* device = instance->nfc_device;
const Iso15693_3Data* data = nfc_device_get_data(device, NfcProtocolIso15693_3);
FuriString* temp_str = furi_string_alloc();
nfc_render_iso15693_3_system_info(data, temp_str);
widget_add_text_scroll_element(
instance->widget, 0, 0, 128, 64, furi_string_get_cstr(temp_str));
furi_string_free(temp_str);
}
static NfcCommand nfc_scene_read_poller_callback_iso15693_3(NfcGenericEvent event, void* context) {
furi_assert(event.protocol == NfcProtocolIso15693_3);
@ -104,13 +118,19 @@ static bool nfc_scene_saved_menu_on_event_iso15693_3(NfcApp* instance, uint32_t
}
const NfcProtocolSupportBase nfc_protocol_support_iso15693_3 = {
.features = NfcProtocolFeatureEmulateFull | NfcProtocolFeatureEditUid,
.features = NfcProtocolFeatureEmulateFull | NfcProtocolFeatureEditUid |
NfcProtocolFeatureMoreInfo,
.scene_info =
{
.on_enter = nfc_scene_info_on_enter_iso15693_3,
.on_event = nfc_protocol_support_common_on_event_empty,
},
.scene_more_info =
{
.on_enter = nfc_scene_more_info_on_enter_iso15693_3,
.on_event = nfc_protocol_support_common_on_event_empty,
},
.scene_read =
{
.on_enter = nfc_scene_read_on_enter_iso15693_3,

View File

@ -36,32 +36,7 @@ void nfc_render_iso15693_3_brief(const Iso15693_3Data* data, FuriString* str) {
}
}
void nfc_render_iso15693_3_extra(const Iso15693_3Data* data, FuriString* str) {
furi_string_cat(str, "\n\e#General info\n");
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_DSFID) {
furi_string_cat_printf(str, "DSFID: %02X\n", data->system_info.ic_ref);
}
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_AFI) {
furi_string_cat_printf(str, "AFI: %02X\n", data->system_info.afi);
}
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_IC_REF) {
furi_string_cat_printf(str, "IC Reference: %02X\n", data->system_info.ic_ref);
}
furi_string_cat(str, "\e#Lock bits\n");
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_DSFID) {
furi_string_cat_printf(
str, "DSFID: %s locked\n", data->settings.lock_bits.dsfid ? "" : "not");
}
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_AFI) {
furi_string_cat_printf(
str, "AFI: %s locked\n", data->settings.lock_bits.dsfid ? "" : "not");
}
void nfc_render_iso15693_3_system_info(const Iso15693_3Data* data, FuriString* str) {
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_MEMORY) {
furi_string_cat(str, "\e#Memory data\n\e*--------------------\n");
@ -88,5 +63,34 @@ void nfc_render_iso15693_3_extra(const Iso15693_3Data* data, FuriString* str) {
"(Data is too big. Showing only the first %u bytes.)",
display_block_count * block_size);
}
} else {
furi_string_cat(str, "\e#No available data\n");
}
}
void nfc_render_iso15693_3_extra(const Iso15693_3Data* data, FuriString* str) {
furi_string_cat(str, "\n::::::::::::::::[General info]:::::::::::::::::\n");
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_DSFID) {
furi_string_cat_printf(str, "DSFID: %02X\n", data->system_info.ic_ref);
}
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_AFI) {
furi_string_cat_printf(str, "AFI: %02X\n", data->system_info.afi);
}
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_IC_REF) {
furi_string_cat_printf(str, "IC Reference: %02X\n", data->system_info.ic_ref);
}
furi_string_cat(str, ":::::::::::::::::::[Lock bits]::::::::::::::::::::\n");
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_DSFID) {
furi_string_cat_printf(
str, "DSFID: %s locked\n", data->settings.lock_bits.dsfid ? "" : "not");
}
if(data->system_info.flags & ISO15693_3_SYSINFO_FLAG_AFI) {
furi_string_cat_printf(
str, "AFI: %s locked\n", data->settings.lock_bits.dsfid ? "" : "not");
}
}

View File

@ -12,3 +12,5 @@ void nfc_render_iso15693_3_info(
void nfc_render_iso15693_3_brief(const Iso15693_3Data* data, FuriString* str);
void nfc_render_iso15693_3_extra(const Iso15693_3Data* data, FuriString* str);
void nfc_render_iso15693_3_system_info(const Iso15693_3Data* data, FuriString* str);

View File

@ -21,6 +21,7 @@ static void nfc_scene_info_on_enter_mf_classic(NfcApp* instance) {
const MfClassicData* data = nfc_device_get_data(device, NfcProtocolMfClassic);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
furi_string_replace(temp_str, "Mifare", "MIFARE");

View File

@ -14,8 +14,10 @@ static void nfc_scene_info_on_enter_mf_desfire(NfcApp* instance) {
const MfDesfireData* data = nfc_device_get_data(device, NfcProtocolMfDesfire);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
furi_string_replace(temp_str, "Mifare", "MIFARE");
nfc_render_mf_desfire_info(data, NfcProtocolFormatTypeFull, temp_str);
widget_add_text_scroll_element(
@ -56,6 +58,7 @@ static void nfc_scene_read_success_on_enter_mf_desfire(NfcApp* instance) {
FuriString* temp_str = furi_string_alloc();
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
furi_string_replace(temp_str, "Mifare", "MIFARE");
nfc_render_mf_desfire_info(data, NfcProtocolFormatTypeShort, temp_str);
widget_add_text_scroll_element(

View File

@ -20,6 +20,8 @@ static void nfc_scene_info_on_enter_mf_ultralight(NfcApp* instance) {
const MfUltralightData* data = nfc_device_get_data(device, NfcProtocolMfUltralight);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_mf_ultralight_info(data, NfcProtocolFormatTypeFull, temp_str);

View File

@ -564,11 +564,11 @@ static void nfc_protocol_support_scene_emulate_on_enter(NfcApp* instance) {
FuriString* temp_str = furi_string_alloc();
const NfcProtocol protocol = nfc_device_get_protocol(instance->nfc_device);
widget_add_icon_element(widget, 0, 3, &I_NFC_dolphin_emulation_47x61);
widget_add_icon_element(widget, 0, 3, &I_NFC_dolphin_emulation_51x64);
if(nfc_protocol_support_has_feature(protocol, NfcProtocolFeatureEmulateUid)) {
widget_add_string_element(
widget, 90, 13, AlignCenter, AlignTop, FontPrimary, "Emulating UID");
widget, 90, 26, AlignCenter, AlignCenter, FontPrimary, "Emulating UID");
size_t uid_len;
const uint8_t* uid = nfc_device_get_uid(instance->nfc_device, &uid_len);
@ -580,7 +580,8 @@ static void nfc_protocol_support_scene_emulate_on_enter(NfcApp* instance) {
furi_string_trim(temp_str);
} else {
widget_add_string_element(widget, 90, 13, AlignCenter, AlignTop, FontPrimary, "Emulating");
widget_add_string_element(
widget, 90, 26, AlignCenter, AlignCenter, FontPrimary, "Emulating");
if(!furi_string_empty(instance->file_name)) {
furi_string_set(temp_str, instance->file_name);
} else {
@ -588,11 +589,12 @@ static void nfc_protocol_support_scene_emulate_on_enter(NfcApp* instance) {
temp_str,
"Unsaved\n%s",
nfc_device_get_name(instance->nfc_device, NfcDeviceNameTypeFull));
furi_string_replace_str(temp_str, "Mifare", "MIFARE");
}
}
widget_add_text_box_element(
widget, 56, 28, 71, 25, AlignCenter, AlignTop, furi_string_get_cstr(temp_str), false);
widget, 56, 33, 71, 25, AlignCenter, AlignTop, furi_string_get_cstr(temp_str), false);
furi_string_free(temp_str);

View File

@ -14,16 +14,30 @@ static void nfc_scene_info_on_enter_slix(NfcApp* instance) {
const SlixData* data = nfc_device_get_data(device, NfcProtocolSlix);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_slix_info(data, NfcProtocolFormatTypeFull, temp_str);
widget_reset(instance->widget);
widget_add_text_scroll_element(
instance->widget, 0, 0, 128, 64, furi_string_get_cstr(temp_str));
furi_string_free(temp_str);
}
static void nfc_scene_more_info_on_enter_slix(NfcApp* instance) {
const NfcDevice* device = instance->nfc_device;
const SlixData* data = nfc_device_get_data(device, NfcProtocolSlix);
FuriString* temp_str = furi_string_alloc();
nfc_render_iso15693_3_system_info(slix_get_base_data(data), temp_str);
widget_add_text_scroll_element(
instance->widget, 0, 0, 128, 64, furi_string_get_cstr(temp_str));
furi_string_free(temp_str);
}
static NfcCommand nfc_scene_read_poller_callback_slix(NfcGenericEvent event, void* context) {
furi_assert(event.protocol == NfcProtocolSlix);
@ -101,13 +115,18 @@ static bool nfc_scene_saved_menu_on_event_slix(NfcApp* instance, uint32_t event)
}
const NfcProtocolSupportBase nfc_protocol_support_slix = {
.features = NfcProtocolFeatureEmulateFull,
.features = NfcProtocolFeatureEmulateFull | NfcProtocolFeatureMoreInfo,
.scene_info =
{
.on_enter = nfc_scene_info_on_enter_slix,
.on_event = nfc_protocol_support_common_on_event_empty,
},
.scene_more_info =
{
.on_enter = nfc_scene_more_info_on_enter_slix,
.on_event = nfc_protocol_support_common_on_event_empty,
},
.scene_read =
{
.on_enter = nfc_scene_read_on_enter_slix,

View File

@ -1,14 +1,12 @@
#include "slix_render.h"
#include "../iso15693_3/iso15693_3_render.h"
void nfc_render_slix_info(const SlixData* data, NfcProtocolFormatType format_type, FuriString* str) {
nfc_render_iso15693_3_brief(slix_get_base_data(data), str);
if(format_type != NfcProtocolFormatTypeFull) return;
const SlixType slix_type = slix_get_type(data);
furi_string_cat(str, "\n\e#Passwords\n");
furi_string_cat(str, "\n::::::::::::::::::[Passwords]:::::::::::::::::\n");
static const char* slix_password_names[] = {
"Read",
@ -25,7 +23,7 @@ void nfc_render_slix_info(const SlixData* data, NfcProtocolFormatType format_typ
}
}
furi_string_cat(str, "\e#Lock bits\n");
furi_string_cat(str, ":::::::::::::::::::[Lock bits]::::::::::::::::::::\n");
if(slix_type_has_features(slix_type, SLIX_TYPE_FEATURE_EAS)) {
furi_string_cat_printf(
@ -38,7 +36,7 @@ void nfc_render_slix_info(const SlixData* data, NfcProtocolFormatType format_typ
const SlixProtection protection = data->system_info.protection;
furi_string_cat(str, "\e#Page protection\n");
furi_string_cat(str, "::::::::::::[Page protection]::::::::::::\n");
furi_string_cat_printf(str, "Pointer: H >= %02X\n", protection.pointer);
const char* rh = (protection.condition & SLIX_PP_CONDITION_RH) ? "" : "un";
@ -52,12 +50,12 @@ void nfc_render_slix_info(const SlixData* data, NfcProtocolFormatType format_typ
}
if(slix_type_has_features(slix_type, SLIX_TYPE_FEATURE_PRIVACY)) {
furi_string_cat(str, "\e#Privacy\n");
furi_string_cat(str, "::::::::::::::::::::[Privacy]::::::::::::::::::::::\n");
furi_string_cat_printf(str, "Privacy mode: %sabled\n", data->privacy ? "en" : "dis");
}
if(slix_type_has_features(slix_type, SLIX_TYPE_FEATURE_SIGNATURE)) {
furi_string_cat(str, "\e#Signature\n");
furi_string_cat(str, ":::::::::::::::::::[Signature]::::::::::::::::::\n");
for(uint32_t i = 0; i < 4; ++i) {
furi_string_cat_printf(str, "%02X ", data->signature[i]);
}

View File

@ -3,5 +3,6 @@
#include <nfc/protocols/slix/slix.h>
#include "../nfc_protocol_support_render_common.h"
#include "../iso15693_3/iso15693_3_render.h"
void nfc_render_slix_info(const SlixData* data, NfcProtocolFormatType format_type, FuriString* str);

View File

@ -13,6 +13,7 @@ static void nfc_scene_info_on_enter_st25tb(NfcApp* instance) {
const St25tbData* data = nfc_device_get_data(device, NfcProtocolSt25tb);
FuriString* temp_str = furi_string_alloc();
nfc_append_filename_string_when_present(instance, temp_str);
furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
nfc_render_st25tb_info(data, NfcProtocolFormatTypeFull, temp_str);

View File

@ -445,6 +445,15 @@ void nfc_app_reset_detected_protocols(NfcApp* instance) {
instance->protocols_detected_num = 0;
}
void nfc_append_filename_string_when_present(NfcApp* instance, FuriString* string) {
furi_assert(instance);
furi_assert(string);
if(!furi_string_empty(instance->file_name)) {
furi_string_cat_printf(string, "Name:%s\n", furi_string_get_cstr(instance->file_name));
}
}
static bool nfc_is_hal_ready() {
if(furi_hal_nfc_is_hal_ready() != FuriHalNfcErrorNone) {
// No connection to the chip, show an error screen

View File

@ -192,3 +192,5 @@ void nfc_make_app_folder(NfcApp* instance);
void nfc_app_set_detected_protocols(NfcApp* instance, const NfcProtocol* types, uint32_t count);
void nfc_app_reset_detected_protocols(NfcApp* instance);
void nfc_append_filename_string_when_present(NfcApp* instance, FuriString* string);

View File

@ -29,6 +29,8 @@ void nfc_scene_select_protocol_on_enter(void* context) {
"%s %s",
prefix,
nfc_device_get_protocol_name(instance->protocols_detected[i]));
furi_string_replace_str(temp_str, "Mifare", "MIFARE");
submenu_add_item(
submenu,
furi_string_get_cstr(temp_str),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB