[FL-2225] About: add serial number to hardware info screen (#970)

This commit is contained in:
あく 2022-01-27 15:21:21 +03:00 committed by GitHub
parent 23ff6723cf
commit e804015fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,6 +89,12 @@ static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage*
furi_hal_version_get_hw_connect(), furi_hal_version_get_hw_connect(),
my_name ? my_name : "Unknown"); my_name ? my_name : "Unknown");
string_cat_printf(buffer, "Serial number:\n");
const uint8_t* uid = furi_hal_version_uid();
for(size_t i = 0; i < furi_hal_version_uid_size(); i++) {
string_cat_printf(buffer, "%02X", uid[i]);
}
dialog_message_set_header(message, "HW Version info:", 0, 0, AlignLeft, AlignTop); dialog_message_set_header(message, "HW Version info:", 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, string_get_cstr(buffer), 0, 13, AlignLeft, AlignTop); dialog_message_set_text(message, string_get_cstr(buffer), 0, 13, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message); result = dialog_message_show(dialogs, message);