Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FL-3678] NFC UI refactor #3382

Merged
merged 82 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
f0838dd
Added new image DolphinSaved_113x58.png for all "saved" pages
RebornedBrain Nov 30, 2023
810dfa1
New image DolphinDone_80x58.png added
RebornedBrain Nov 30, 2023
f7de656
Replaced dolphins on all scenes accroding to new UI specs
RebornedBrain Nov 30, 2023
94cdaf2
New success dolphin image added
RebornedBrain Dec 1, 2023
59e797b
Success scene image replaced
RebornedBrain Dec 1, 2023
7554e7b
Changed image and text for update initial scene
RebornedBrain Dec 1, 2023
fa04e36
Image and text adjusted for "Original restored" scene
RebornedBrain Dec 1, 2023
f151d3b
Removed old DolphinNice_96x59.png image
RebornedBrain Dec 1, 2023
ff724ce
New image for LFRFID scene
RebornedBrain Dec 4, 2023
7af6a46
Removed unused image
RebornedBrain Dec 4, 2023
38b65fb
New UI image added to assets
RebornedBrain Dec 4, 2023
d113bbf
Replaced warning dolphin on mf_classic write initial fail scene
RebornedBrain Dec 4, 2023
278ae51
Removed old image
RebornedBrain Dec 4, 2023
12180ba
Changed image on scenes to a new one
RebornedBrain Dec 4, 2023
18ea05e
New dolphin mafia image
RebornedBrain Dec 5, 2023
064c60e
Replaced dolphin mafia image to a new one
RebornedBrain Dec 5, 2023
fa146d8
Removed DolphinMafia_115x62.png
RebornedBrain Dec 5, 2023
59e9456
New check symbol on completed state for detect_reader
RebornedBrain Dec 6, 2023
f3cbb03
Adjusted layout elements position
RebornedBrain Dec 14, 2023
94e8e5d
Removed second switching to popup view in order to achieve control in…
RebornedBrain Dec 14, 2023
1a56ce7
CardDetected event now also triggers on_event callback
RebornedBrain Dec 14, 2023
04e28f3
Now on AuthRequest we throw CardDetected custom event
RebornedBrain Dec 14, 2023
d7b54df
Added callback for read_on_event
RebornedBrain Dec 14, 2023
69d1d54
Now we show different screen while reading and unlocking
RebornedBrain Dec 14, 2023
cf6829f
Merge branch 'dev' into reborned/nfc_ui_refactor
skotopes Dec 18, 2023
4a77a23
Fixed missing asstes for some scenes
RebornedBrain Dec 18, 2023
d5164c4
Update DolphinMafia_119x62.png
RebornedBrain Dec 19, 2023
5bff5ca
Adjusted all the scenes with DolphinMafia image
RebornedBrain Dec 19, 2023
33136b4
Scenes with save image adjusted
RebornedBrain Dec 19, 2023
3ec0703
Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_1…
RebornedBrain Dec 19, 2023
2b3e12f
All common dolphins moved to Dolphin folder
RebornedBrain Dec 20, 2023
09defbc
Moved DolphinReadingSuccess_59x63.png to Dolphin folder
RebornedBrain Dec 20, 2023
e9e44db
Merge branch 'reborned/nfc_ui_refactor' of [email protected]:RebornedBra…
RebornedBrain Dec 21, 2023
3edbf8f
Set proper led color for detect and read scenes
RebornedBrain Dec 28, 2023
d65dfe1
Added new notification sequence for semi_success results
RebornedBrain Dec 28, 2023
305d5bc
Use new sequence for semi_success nfc reads
RebornedBrain Dec 28, 2023
cf4b537
Different events are now throwed depending on read result
RebornedBrain Dec 28, 2023
bf78ace
Added handling of incomplete event for ultralight cards
RebornedBrain Dec 28, 2023
4b36347
Replaced image for iButton scene
RebornedBrain Dec 28, 2023
d55652d
Updated API for f18
RebornedBrain Dec 28, 2023
13fe872
Merge branch 'dev'
RebornedBrain Dec 28, 2023
f4e738a
Merge branch 'dev' into reborned/nfc_ui_refactor_2
gornekich Dec 28, 2023
5994c26
Merge branch 'dev' into reborned/nfc_ui_refactor_2
skotopes Dec 29, 2023
e2a7d5f
Fixed issue with unlock retry sequence
RebornedBrain Dec 29, 2023
82ecc8e
Fix after review
RebornedBrain Dec 29, 2023
0a44c75
Success notification replaced to semi success in case of incomplete m…
RebornedBrain Dec 29, 2023
c9ffe4a
New text for read scene
RebornedBrain Dec 29, 2023
18fbe36
New read result sound notification logic for mf classic cards
RebornedBrain Dec 29, 2023
843fa3e
Merge branch 'dev'
RebornedBrain Jan 10, 2024
1ea99d1
Merge branch 'dev'
RebornedBrain Jan 10, 2024
cfb974d
Change MIFARE name accroding to new requirements
RebornedBrain Jan 10, 2024
686fd20
New QR code image for MFKey app
RebornedBrain Jan 10, 2024
14af1fe
Update nfc_scene_mf_classic_mfkey_complete.c scene according to new U…
RebornedBrain Jan 10, 2024
85f437e
Update detect_reader.c and check_big_20x17.png
RebornedBrain Jan 10, 2024
4397e2c
New nfc save confirm scene added
RebornedBrain Jan 11, 2024
d3c994c
Implemented new flow for 'Detect Reader button' after partial mf clas…
RebornedBrain Jan 11, 2024
bfffaf5
UID for 15693 tags now shown on the new line
RebornedBrain Jan 12, 2024
685ed6b
Fix nfc unit tests
RebornedBrain Jan 12, 2024
01d178a
Merge branch 'dev' into reborned/nfc_ui_refactor_2
gornekich Jan 12, 2024
8799e11
Revert "Fix nfc unit tests"
RebornedBrain Jan 12, 2024
6103de1
Rolled back all Mifare renamings in library files
RebornedBrain Jan 12, 2024
22aba52
Revert "Change MIFARE name accroding to new requirements"
RebornedBrain Jan 12, 2024
321a56d
Now Mifare word is changed only on the app level without changes to l…
RebornedBrain Jan 12, 2024
c539cfa
Merge branch 'dev' into reborned/nfc_ui_refactor_2
skotopes Jan 14, 2024
957a89f
Filename or "Unsaved + CardType" is now showed for saved cards during…
RebornedBrain Jan 15, 2024
be15c5f
Headers added to Write scenes
RebornedBrain Jan 15, 2024
ba6b564
Reordered menu items accrding to new spec
RebornedBrain Jan 15, 2024
f1a9726
Merge commit 'd73d00779788db49d5306f51fb4c789b54568281'
RebornedBrain Jan 15, 2024
cb0cf7b
Merge branch 'dev' into reborned/nfc_ui_refactor_2
skotopes Jan 16, 2024
bae0baa
Filename will be printed for saved tag in info scene
RebornedBrain Jan 16, 2024
9e8e5d8
New info render format for 14443_3a cards
RebornedBrain Jan 17, 2024
d9e4a60
New info render format for 14443_3b cards
RebornedBrain Jan 17, 2024
dc8b0b0
New info render format for 14443_4a cards
RebornedBrain Jan 17, 2024
61067b0
New info render format for iso15693 cards.
RebornedBrain Jan 17, 2024
5655be1
New info render format for slix cards.
RebornedBrain Jan 17, 2024
81e4e94
Merge branch 'dev'
RebornedBrain Jan 18, 2024
ab236f3
Fixed "Mifare" word for desfire cards
RebornedBrain Jan 18, 2024
c470748
Aligned text and replaced dolphin image on emulate scene
RebornedBrain Jan 23, 2024
74023e4
Fixed Mifare caption after QA
RebornedBrain Jan 23, 2024
eb4d0bb
Realigned emulation scene and fixed replaced Mifare to MIFARE
RebornedBrain Jan 23, 2024
39e5e84
Merge branch 'dev' into reborned/nfc_ui_refactor_2
gornekich Feb 6, 2024
dc21df7
Merge branch 'dev' into reborned/nfc_ui_refactor_2
gornekich Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:");
Expand All @@ -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");
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,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, 28, AlignCenter, AlignCenter, FontPrimary, "Emulating UID");

size_t uid_len;
const uint8_t* uid = nfc_device_get_uid(instance->nfc_device, &uid_len);
Expand All @@ -581,7 +581,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, 28, AlignCenter, AlignCenter, FontPrimary, "Emulating");
if(!furi_string_empty(instance->file_name)) {
furi_string_set(temp_str, instance->file_name);
} else {
Expand All @@ -593,7 +594,7 @@ static void nfc_protocol_support_scene_emulate_on_enter(NfcApp* instance) {
}

widget_add_text_box_element(
widget, 56, 28, 71, 25, AlignCenter, AlignTop, furi_string_get_cstr(temp_str), false);
widget, 56, 30, 71, 25, AlignCenter, AlignCenter, furi_string_get_cstr(temp_str), false);

furi_string_free(temp_str);

Expand Down
21 changes: 20 additions & 1 deletion applications/main/nfc/helpers/protocol_support/slix/slix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down
Loading
Loading