[FL-1961] Cli: device_info format versioning. Detach target from firmware name. #765

This commit is contained in:
あく
2021-10-16 14:25:32 +03:00
committed by GitHub
parent 0e14545d48
commit 2255060d52
14 changed files with 79 additions and 52 deletions

View File

@@ -110,7 +110,7 @@ static DialogMessageButton fw_version_screen(DialogsApp* dialogs, DialogMessage*
} else {
string_cat_printf(
buffer,
"%s [%s]\n%s [%s]\n[%s] %s",
"%s [%s]\n%s [%s]\n[%d] %s",
version_get_version(ver),
version_get_builddate(ver),
version_get_githash(ver),
@@ -140,7 +140,7 @@ static DialogMessageButton boot_version_screen(DialogsApp* dialogs, DialogMessag
} else {
string_cat_printf(
buffer,
"%s [%s]\n%s [%s]\n[%s] %s",
"%s [%s]\n%s [%s]\n[%d] %s",
version_get_version(ver),
version_get_builddate(ver),
version_get_githash(ver),

View File

@@ -55,6 +55,9 @@ static const uint8_t enclave_signature_expected[ENCLAVE_SIGNATURE_KEY_SLOTS][ENC
* Keys and values format MUST NOT BE changed
*/
void cli_command_device_info(Cli* cli, string_t args, void* context) {
// Device Info version
printf("device_info_major : %d\r\n", 1);
printf("device_info_minor : %d\r\n", 0);
// Model name
printf("hardware_model : %s\r\n", furi_hal_version_get_model_name());
@@ -88,21 +91,23 @@ void cli_command_device_info(Cli* cli, string_t args, void* context) {
// Bootloader Version
const Version* boot_version = furi_hal_version_get_boot_version();
if(boot_version) {
printf("boot_version : %s\r\n", version_get_version(boot_version));
printf("boot_target : %s\r\n", version_get_target(boot_version));
printf("boot_commit : %s\r\n", version_get_githash(boot_version));
printf("boot_branch : %s\r\n", version_get_gitbranch(boot_version));
printf("boot_branch_num : %s\r\n", version_get_gitbranchnum(boot_version));
printf("boot_version : %s\r\n", version_get_version(boot_version));
printf("boot_build_date : %s\r\n", version_get_builddate(boot_version));
printf("boot_target : %d\r\n", version_get_target(boot_version));
}
// Firmware version
const Version* firmware_version = furi_hal_version_get_firmware_version();
if(firmware_version) {
printf("firmware_version : %s\r\n", version_get_version(firmware_version));
printf("firmware_target : %s\r\n", version_get_target(firmware_version));
printf("firmware_commit : %s\r\n", version_get_githash(firmware_version));
printf("firmware_branch : %s\r\n", version_get_gitbranch(firmware_version));
printf("firmware_branch_num : %s\r\n", version_get_gitbranchnum(firmware_version));
printf("firmware_version : %s\r\n", version_get_version(firmware_version));
printf("firmware_build_date : %s\r\n", version_get_builddate(firmware_version));
printf("firmware_target : %d\r\n", version_get_target(firmware_version));
}
WirelessFwInfo_t pWirelessInfo;

View File

@@ -15,8 +15,9 @@ void desktop_scene_hw_mismatch_on_enter(void* context) {
snprintf(
buffer,
sizeof(buffer),
"HW target: F%d\nFW target: " TARGET,
furi_hal_version_get_hw_target());
"HW target: %d\nFW target: %d",
furi_hal_version_get_hw_target(),
version_get_target(NULL));
popup_set_context(popup, desktop);
popup_set_header(popup, "!!!! HW Mismatch !!!!", 60, 14, AlignCenter, AlignCenter);
popup_set_text(popup, buffer, 60, 37, AlignCenter, AlignCenter);

View File

@@ -67,7 +67,7 @@ void desktop_debug_render(Canvas* canvas, void* model) {
canvas_draw_str(canvas, 5, 43, buffer);
snprintf(
buffer, sizeof(buffer), "[%s] %s", version_get_target(ver), version_get_gitbranch(ver));
buffer, sizeof(buffer), "[%d] %s", version_get_target(ver), version_get_gitbranch(ver));
canvas_draw_str(canvas, 5, 54, buffer);
} else {