From 6ee2c15854c3f29490697cdf85388ae5754eeba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=81=8F?= Date: Fri, 12 Aug 2022 19:19:29 +0900 Subject: [PATCH] FuriHal,About,Desktop: show provisioned region (#1589) Co-authored-by: hedger --- applications/about/about.c | 4 +++- applications/desktop/views/desktop_view_debug.c | 3 ++- firmware/targets/f7/furi_hal/furi_hal_version.c | 2 ++ firmware/targets/furi_hal_include/furi_hal_version.h | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/applications/about/about.c b/applications/about/about.c index f785c2e40..6b4489f0a 100644 --- a/applications/about/about.c +++ b/applications/about/about.c @@ -5,6 +5,7 @@ #include #include #include +#include #include typedef DialogMessageButton (*AboutDialogScreen)(DialogsApp* dialogs, DialogMessage* message); @@ -83,12 +84,13 @@ static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage* string_cat_printf( buffer, - "%d.F%dB%dC%d %s %s\n", + "%d.F%dB%dC%d %s:%s %s\n", furi_hal_version_get_hw_version(), furi_hal_version_get_hw_target(), furi_hal_version_get_hw_body(), furi_hal_version_get_hw_connect(), furi_hal_version_get_hw_region_name(), + furi_hal_region_get_name(), my_name ? my_name : "Unknown"); string_cat_printf(buffer, "Serial Number:\n"); diff --git a/applications/desktop/views/desktop_view_debug.c b/applications/desktop/views/desktop_view_debug.c index e26411932..69c82bdbe 100644 --- a/applications/desktop/views/desktop_view_debug.c +++ b/applications/desktop/views/desktop_view_debug.c @@ -36,12 +36,13 @@ void desktop_debug_render(Canvas* canvas, void* model) { snprintf( buffer, sizeof(buffer), - "%d.F%dB%dC%d %s %s", + "%d.F%dB%dC%d %s:%s %s", furi_hal_version_get_hw_version(), furi_hal_version_get_hw_target(), furi_hal_version_get_hw_body(), furi_hal_version_get_hw_connect(), furi_hal_version_get_hw_region_name(), + furi_hal_region_get_name(), my_name ? my_name : "Unknown"); canvas_draw_str(canvas, 5, 19 + STATUS_BAR_Y_SHIFT, buffer); diff --git a/firmware/targets/f7/furi_hal/furi_hal_version.c b/firmware/targets/f7/furi_hal/furi_hal_version.c index 7abee281f..0d87c8073 100644 --- a/firmware/targets/f7/furi_hal/furi_hal_version.c +++ b/firmware/targets/f7/furi_hal/furi_hal_version.c @@ -262,6 +262,8 @@ const char* furi_hal_version_get_hw_region_name() { return "R02"; case FuriHalVersionRegionJp: return "R03"; + case FuriHalVersionRegionWorld: + return "R04"; } return "R??"; } diff --git a/firmware/targets/furi_hal_include/furi_hal_version.h b/firmware/targets/furi_hal_include/furi_hal_version.h index 500e0d813..720fdfd17 100644 --- a/firmware/targets/furi_hal_include/furi_hal_version.h +++ b/firmware/targets/furi_hal_include/furi_hal_version.h @@ -41,6 +41,7 @@ typedef enum { FuriHalVersionRegionEuRu = 0x01, FuriHalVersionRegionUsCaAu = 0x02, FuriHalVersionRegionJp = 0x03, + FuriHalVersionRegionWorld = 0x04, } FuriHalVersionRegion; /** Device Display */