Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into mntm-dev --nobuild
  • Loading branch information
Willy-JL committed May 4, 2024
2 parents 84cbe75 + a89a67d commit f04975f
Show file tree
Hide file tree
Showing 34 changed files with 614 additions and 1,427 deletions.
19 changes: 13 additions & 6 deletions applications/main/ibutton/scenes/ibutton_scene_delete_confirm.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ void ibutton_scene_delete_confirm_on_enter(void* context) {

ibutton_protocols_render_uid(ibutton->protocols, key, uid);

furi_string_cat_printf(
uid,
"\n%s %s",
ibutton_protocols_get_manufacturer(ibutton->protocols, ibutton_key_get_protocol_id(key)),
ibutton_protocols_get_name(ibutton->protocols, ibutton_key_get_protocol_id(key)));

furi_string_cat(tmp, uid);

furi_string_push_back(tmp, '\n');

const char* protocol =
ibutton_protocols_get_name(ibutton->protocols, ibutton_key_get_protocol_id(key));
const char* manufacturer =
ibutton_protocols_get_manufacturer(ibutton->protocols, ibutton_key_get_protocol_id(key));

if(strcasecmp(protocol, manufacturer) != 0 && strcasecmp(manufacturer, "N/A") != 0) {
furi_string_cat_printf(tmp, "%s ", manufacturer);
}

furi_string_cat(tmp, protocol);

widget_add_text_box_element(
widget, 0, 0, 128, 64, AlignCenter, AlignTop, furi_string_get_cstr(tmp), false);

Expand Down
15 changes: 6 additions & 9 deletions applications/main/ibutton/scenes/ibutton_scene_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ void ibutton_scene_emulate_on_enter(void* context) {

widget_add_icon_element(widget, 3, 10, &I_iButtonKey_49x44);

if(furi_string_empty(ibutton->file_path)) {
furi_string_printf(
tmp,
"Unsaved\n%s",
ibutton_protocols_get_name(ibutton->protocols, ibutton_key_get_protocol_id(key)));
} else {
furi_string_printf(tmp, "%s", ibutton->key_name);
}
furi_string_printf(
tmp,
"[%s]\n%s",
ibutton_protocols_get_name(ibutton->protocols, ibutton_key_get_protocol_id(key)),
furi_string_empty(ibutton->file_path) ? "Unsaved Key" : ibutton->key_name);

widget_add_text_box_element(
widget, 52, 23, 75, 26, AlignCenter, AlignTop, furi_string_get_cstr(tmp), false);
widget, 52, 24, 75, 40, AlignCenter, AlignTop, furi_string_get_cstr(tmp), true);

widget_add_string_multiline_element(
widget, 88, 10, AlignCenter, AlignTop, FontPrimary, "Emulating");
Expand Down
23 changes: 17 additions & 6 deletions applications/main/ibutton/scenes/ibutton_scene_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,23 @@ void ibutton_scene_info_on_enter(void* context) {
FuriString* tmp = furi_string_alloc();
FuriString* brief_data = furi_string_alloc();

furi_string_printf(
tmp,
"Name:%s\n\e#%s %s\e#\n",
ibutton->key_name,
ibutton_protocols_get_manufacturer(ibutton->protocols, protocol_id),
ibutton_protocols_get_name(ibutton->protocols, protocol_id));
if((strcmp(
ibutton_protocols_get_manufacturer(ibutton->protocols, protocol_id),
ibutton_protocols_get_name(ibutton->protocols, protocol_id)) != 0) &&
(strcmp(ibutton_protocols_get_manufacturer(ibutton->protocols, protocol_id), "N/A") != 0)) {
furi_string_printf(
tmp,
"Name:%s\n\e#%s %s\e#\n",
ibutton->key_name,
ibutton_protocols_get_manufacturer(ibutton->protocols, protocol_id),
ibutton_protocols_get_name(ibutton->protocols, protocol_id));
} else {
furi_string_printf(
tmp,
"Name:%s\n\e#%s\e#\n",
ibutton->key_name,
ibutton_protocols_get_name(ibutton->protocols, protocol_id));
}

ibutton_protocols_render_brief_data(ibutton->protocols, key, brief_data);

Expand Down
13 changes: 6 additions & 7 deletions applications/main/ibutton/scenes/ibutton_scene_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ void ibutton_scene_write_on_enter(void* context) {

widget_add_icon_element(widget, 3, 10, &I_iButtonKey_49x44);

if(furi_string_empty(ibutton->file_path)) {
furi_string_printf(
tmp, "Unsaved\n%s", ibutton_protocols_get_name(ibutton->protocols, protocol_id));
} else {
furi_string_printf(tmp, "%s", ibutton->key_name);
}
furi_string_printf(
tmp,
"[%s]\n%s",
ibutton_protocols_get_name(ibutton->protocols, protocol_id),
furi_string_empty(ibutton->file_path) ? "Unsaved Key" : ibutton->key_name);

widget_add_text_box_element(
widget, 52, 23, 75, 26, AlignCenter, AlignTop, furi_string_get_cstr(tmp), false);
widget, 52, 24, 75, 40, AlignCenter, AlignTop, furi_string_get_cstr(tmp), true);

ibutton_worker_write_set_callback(worker, ibutton_scene_write_callback, ibutton);

Expand Down
13 changes: 6 additions & 7 deletions applications/main/lfrfid/scenes/lfrfid_scene_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ void lfrfid_scene_emulate_on_enter(void* context) {

FuriString* display_text = furi_string_alloc_set("\e#Emulating\e#\n");

if(furi_string_empty(app->file_name)) {
furi_string_cat(display_text, "Unsaved\n");
furi_string_cat(display_text, protocol_dict_get_name(app->dict, app->protocol_id));
} else {
furi_string_cat(display_text, app->file_name);
}
furi_string_cat_printf(
display_text,
"[%s]\n%s",
protocol_dict_get_name(app->dict, app->protocol_id),
furi_string_empty(app->file_name) ? "Unsaved Tag" : furi_string_get_cstr(app->file_name));

widget_add_icon_element(widget, 0, 0, &I_NFC_dolphin_emulation_51x64);
widget_add_text_box_element(
widget, 55, 16, 67, 48, AlignCenter, AlignTop, furi_string_get_cstr(display_text), true);
widget, 51, 6, 79, 50, AlignCenter, AlignTop, furi_string_get_cstr(display_text), false);

furi_string_free(display_text);

Expand Down
10 changes: 8 additions & 2 deletions applications/main/lfrfid/scenes/lfrfid_scene_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ void lfrfid_scene_write_on_enter(void* context) {
popup_set_header(popup, "Writing", 94, 16, AlignCenter, AlignTop);

if(!furi_string_empty(app->file_name)) {
popup_set_text(popup, furi_string_get_cstr(app->file_name), 94, 29, AlignCenter, AlignTop);
snprintf(
app->text_store,
LFRFID_TEXT_STORE_SIZE,
"[%s]\n%s",
protocol_dict_get_name(app->dict, app->protocol_id),
furi_string_get_cstr(app->file_name));
popup_set_text(popup, app->text_store, 94, 29, AlignCenter, AlignTop);
} else {
snprintf(
app->text_store,
LFRFID_TEXT_STORE_SIZE,
"Unsaved\n%s",
"[%s]\nUnsaved Tag",
protocol_dict_get_name(app->dict, app->protocol_id));
popup_set_text(popup, app->text_store, 94, 29, AlignCenter, AlignTop);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ void lfrfid_scene_write_and_set_pass_on_enter(void* context) {
LfRfid* app = context;
Popup* popup = app->popup;

popup_set_header(popup, "Writing\nwith password", 89, 30, AlignCenter, AlignTop);
popup_set_icon(popup, 0, 3, &I_RFIDDolphinSend_97x61);
popup_set_header(popup, "Writing\nwith\npassword", 94, 8, AlignCenter, AlignTop);
popup_set_icon(popup, 0, 8, &I_NFC_manual_60x50);
snprintf(
app->text_store,
LFRFID_TEXT_STORE_SIZE,
"[%s]",
protocol_dict_get_name(app->dict, app->protocol_id));
popup_set_text(popup, app->text_store, 94, 45, AlignCenter, AlignTop);

view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup);

Expand Down
121 changes: 0 additions & 121 deletions applications/main/nfc/helpers/protocol_support/mf_plus/mf_plus.c

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "felica/felica.h"
#include "mf_ultralight/mf_ultralight.h"
#include "mf_classic/mf_classic.h"
#include "mf_plus/mf_plus.h"
#include "mf_desfire/mf_desfire.h"
#include "emv/emv.h"
#include "slix/slix.h"
Expand All @@ -40,7 +39,6 @@ const NfcProtocolSupportBase* nfc_protocol_support[NfcProtocolNum] = {
[NfcProtocolFelica] = &nfc_protocol_support_felica,
[NfcProtocolMfUltralight] = &nfc_protocol_support_mf_ultralight,
[NfcProtocolMfClassic] = &nfc_protocol_support_mf_classic,
[NfcProtocolMfPlus] = &nfc_protocol_support_mf_plus,
[NfcProtocolMfDesfire] = &nfc_protocol_support_mf_desfire,
[NfcProtocolSlix] = &nfc_protocol_support_slix,
[NfcProtocolSt25tb] = &nfc_protocol_support_st25tb,
Expand Down
Loading

0 comments on commit f04975f

Please sign in to comment.