mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 21:48:35 -07:00
Merge branch 'Next-Flip:dev' into dev
This commit is contained in:
@@ -247,6 +247,8 @@ static void nfc_scene_read_success_on_enter_mf_ultralight(NfcApp* instance) {
|
||||
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_ultralight_info(data, NfcProtocolFormatTypeShort, temp_str);
|
||||
}
|
||||
|
||||
|
||||
@@ -574,7 +574,7 @@ 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_51x64);
|
||||
widget_add_icon_element(widget, 0, 0, &I_NFC_dolphin_emulation_51x64);
|
||||
|
||||
if(nfc_protocol_support_has_feature(protocol, NfcProtocolFeatureEmulateUid)) {
|
||||
widget_add_string_element(
|
||||
|
||||
@@ -20,8 +20,8 @@ static AllInOneLayoutType all_in_one_get_layout(const MfUltralightData* data) {
|
||||
const uint8_t layout_byte = data->page[5].data[2];
|
||||
const uint8_t layout_half_byte = data->page[5].data[2] & 0x0F;
|
||||
|
||||
FURI_LOG_I(TAG, "Layout byte: %02x", layout_byte);
|
||||
FURI_LOG_I(TAG, "Layout half-byte: %02x", layout_half_byte);
|
||||
FURI_LOG_D(TAG, "Layout byte: %02x", layout_byte);
|
||||
FURI_LOG_D(TAG, "Layout half-byte: %02x", layout_half_byte);
|
||||
|
||||
switch(layout_half_byte) {
|
||||
// If it is A, the layout type is a type A layout
|
||||
@@ -32,7 +32,7 @@ static AllInOneLayoutType all_in_one_get_layout(const MfUltralightData* data) {
|
||||
case 0x02:
|
||||
return AllInOneLayoutType2;
|
||||
default:
|
||||
FURI_LOG_I(TAG, "Unknown layout type: %d", layout_half_byte);
|
||||
FURI_LOG_E(TAG, "Unknown layout type: %d", layout_half_byte);
|
||||
return AllInOneLayoutTypeUnknown;
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ static bool all_in_one_parse(const NfcDevice* device, FuriString* parsed_data) {
|
||||
|
||||
do {
|
||||
if(data->page[4].data[0] != 0x45 || data->page[4].data[1] != 0xD9) {
|
||||
FURI_LOG_I(TAG, "Pass not verified");
|
||||
FURI_LOG_E(TAG, "Pass not verified");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ static bool all_in_one_parse(const NfcDevice* device, FuriString* parsed_data) {
|
||||
// If the layout is D, the ride count is stored in the second byte of page 9
|
||||
ride_count = data->page[9].data[1];
|
||||
} else {
|
||||
FURI_LOG_I(TAG, "Unknown layout: %d", layout_type);
|
||||
FURI_LOG_E(TAG, "Unknown layout: %d", layout_type);
|
||||
ride_count = 137;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ void from_minutes_to_datetime(uint32_t minutes, DateTime* datetime, uint16_t sta
|
||||
bool parse_transport_block(const MfClassicBlock* block, FuriString* result) {
|
||||
uint16_t transport_departament = bit_lib_get_bits_16(block->data, 0, 10);
|
||||
|
||||
FURI_LOG_I(TAG, "Transport departament: %x", transport_departament);
|
||||
FURI_LOG_D(TAG, "Transport departament: %x", transport_departament);
|
||||
|
||||
uint16_t layout_type = bit_lib_get_bits_16(block->data, 52, 4);
|
||||
if(layout_type == 0xE) {
|
||||
@@ -91,7 +91,7 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) {
|
||||
layout_type = bit_lib_get_bits_16(block->data, 52, 14);
|
||||
}
|
||||
|
||||
FURI_LOG_I(TAG, "Layout type %x", layout_type);
|
||||
FURI_LOG_D(TAG, "Layout type %x", layout_type);
|
||||
|
||||
uint16_t card_view = 0;
|
||||
uint16_t card_type = 0;
|
||||
|
||||
@@ -20,12 +20,17 @@ void nfc_scene_mf_ultralight_unlock_menu_on_enter(void* context) {
|
||||
uint32_t state =
|
||||
scene_manager_get_scene_state(nfc->scene_manager, NfcSceneMfUltralightUnlockMenu);
|
||||
if(nfc_device_get_protocol(nfc->nfc_device) == NfcProtocolMfUltralight) {
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
"Unlock With Reader",
|
||||
SubmenuIndexMfUlUnlockMenuReader,
|
||||
nfc_scene_mf_ultralight_unlock_menu_submenu_callback,
|
||||
nfc);
|
||||
const MfUltralightData* mfu_data =
|
||||
nfc_device_get_data(nfc->nfc_device, NfcProtocolMfUltralight);
|
||||
// Hide for MFU-C since it uses 3DES
|
||||
if(mfu_data->type != MfUltralightTypeMfulC) {
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
"Unlock With Reader",
|
||||
SubmenuIndexMfUlUnlockMenuReader,
|
||||
nfc_scene_mf_ultralight_unlock_menu_submenu_callback,
|
||||
nfc);
|
||||
}
|
||||
}
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
|
||||
Reference in New Issue
Block a user