diff --git a/scenes/picopass_scene_device_info.c b/scenes/picopass_scene_device_info.c index 41d0bad817d..60ed6ed948b 100644 --- a/scenes/picopass_scene_device_info.c +++ b/scenes/picopass_scene_device_info.c @@ -17,7 +17,6 @@ void picopass_scene_device_info_on_enter(void* context) { FuriString* csn_str = furi_string_alloc_set("CSN:"); FuriString* credential_str = furi_string_alloc(); FuriString* wiegand_str = furi_string_alloc(); - FuriString* sio_str = furi_string_alloc(); dolphin_deed(DolphinDeedNfcReadSuccess); @@ -43,7 +42,7 @@ void picopass_scene_device_info_on_enter(void* context) { } furi_string_set(credential_str, ""); for(uint8_t i = RFAL_PICOPASS_BLOCK_LEN - bytesLength; i < RFAL_PICOPASS_BLOCK_LEN; i++) { - furi_string_cat_printf(credential_str, " %02X", pacs->credential[i]); + furi_string_cat_printf(credential_str, "%02X", pacs->credential[i]); } if(pacs->record.valid) { @@ -54,7 +53,7 @@ void picopass_scene_device_info_on_enter(void* context) { } if(pacs->sio) { - furi_string_cat_printf(sio_str, "+SIO"); + furi_string_cat_printf(credential_str, " +SIO"); } } @@ -70,13 +69,10 @@ void picopass_scene_device_info_on_enter(void* context) { AlignCenter, FontSecondary, furi_string_get_cstr(credential_str)); - widget_add_string_element( - widget, 64, 46, AlignCenter, AlignCenter, FontSecondary, furi_string_get_cstr(sio_str)); furi_string_free(csn_str); furi_string_free(credential_str); furi_string_free(wiegand_str); - furi_string_free(sio_str); widget_add_button_element( picopass->widget, diff --git a/scenes/picopass_scene_read_card_success.c b/scenes/picopass_scene_read_card_success.c index 2f80cd7b9a0..adcdaded36b 100644 --- a/scenes/picopass_scene_read_card_success.c +++ b/scenes/picopass_scene_read_card_success.c @@ -19,7 +19,7 @@ void picopass_scene_read_card_success_on_enter(void* context) { FuriString* csn_str = furi_string_alloc_set("CSN:"); FuriString* credential_str = furi_string_alloc(); FuriString* wiegand_str = furi_string_alloc(); - FuriString* sio_str = furi_string_alloc(); + FuriString* key_str = furi_string_alloc(); dolphin_deed(DolphinDeedNfcReadSuccess); @@ -79,7 +79,7 @@ void picopass_scene_read_card_success_on_enter(void* context) { size_t bytesLength = 1 + pacs->record.bitLength / 8; furi_string_set(credential_str, ""); for(uint8_t i = RFAL_PICOPASS_BLOCK_LEN - bytesLength; i < RFAL_PICOPASS_BLOCK_LEN; i++) { - furi_string_cat_printf(credential_str, " %02X", pacs->credential[i]); + furi_string_cat_printf(credential_str, "%02X", pacs->credential[i]); } if(pacs->record.valid) { @@ -90,19 +90,16 @@ void picopass_scene_read_card_success_on_enter(void* context) { } if(pacs->sio) { - furi_string_cat_printf(sio_str, "+SIO"); + furi_string_cat_printf(credential_str, " +SIO"); } if(pacs->key) { - if(pacs->sio) { - furi_string_cat_printf(sio_str, " "); - } - furi_string_cat_printf(sio_str, "Key: "); + furi_string_cat_printf(key_str, "Key: "); uint8_t key[RFAL_PICOPASS_BLOCK_LEN]; memcpy(key, &pacs->key, RFAL_PICOPASS_BLOCK_LEN); for(uint8_t i = 0; i < RFAL_PICOPASS_BLOCK_LEN; i++) { - furi_string_cat_printf(sio_str, "%02X", key[i]); + furi_string_cat_printf(key_str, "%02X", key[i]); } } @@ -134,12 +131,12 @@ void picopass_scene_read_card_success_on_enter(void* context) { FontSecondary, furi_string_get_cstr(credential_str)); widget_add_string_element( - widget, 64, 46, AlignCenter, AlignCenter, FontSecondary, furi_string_get_cstr(sio_str)); + widget, 64, 46, AlignCenter, AlignCenter, FontSecondary, furi_string_get_cstr(key_str)); furi_string_free(csn_str); furi_string_free(credential_str); furi_string_free(wiegand_str); - furi_string_free(sio_str); + furi_string_free(key_str); view_dispatcher_switch_to_view(picopass->view_dispatcher, PicopassViewWidget); }