diff --git a/applications/about/about.c b/applications/about/about.c index bda50a4b..9e3fd34e 100644 --- a/applications/about/about.c +++ b/applications/about/about.c @@ -82,11 +82,12 @@ static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage* string_cat_printf( buffer, - "%d.F%dB%dC%d %s\n", + "%d.F%dB%dC%d %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(), 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 98cf57ce..75a9bab1 100644 --- a/applications/desktop/views/desktop_view_debug.c +++ b/applications/desktop/views/desktop_view_debug.c @@ -36,11 +36,12 @@ void desktop_debug_render(Canvas* canvas, void* model) { snprintf( buffer, sizeof(buffer), - "HW: %d.F%dB%dC%d %s", + "%d.F%dB%dC%d %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(), 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 be92b348..fdc4d203 100644 --- a/firmware/targets/f7/furi_hal/furi_hal_version.c +++ b/firmware/targets/f7/furi_hal/furi_hal_version.c @@ -252,6 +252,20 @@ const FuriHalVersionRegion furi_hal_version_get_hw_region() { return furi_hal_version.board_region; } +const char* furi_hal_version_get_hw_region_name() { + switch(furi_hal_version_get_hw_region()) { + case FuriHalVersionRegionUnknown: + return "D"; + case FuriHalVersionRegionJp: + return "Jp"; + case FuriHalVersionRegionEuRu: + return "Eu"; + case FuriHalVersionRegionUsCaAu: + return "Us"; + } + return "U"; +} + const FuriHalVersionDisplay furi_hal_version_get_hw_display() { return furi_hal_version.board_display; } diff --git a/firmware/targets/furi_hal_include/furi_hal_version.h b/firmware/targets/furi_hal_include/furi_hal_version.h index f174ade8..500e0d81 100644 --- a/firmware/targets/furi_hal_include/furi_hal_version.h +++ b/firmware/targets/furi_hal_include/furi_hal_version.h @@ -108,6 +108,12 @@ uint8_t furi_hal_version_get_hw_connect(); */ FuriHalVersionRegion furi_hal_version_get_hw_region(); +/** Get hardware region name + * + * @return Hardware Region name + */ +const char* furi_hal_version_get_hw_region_name(); + /** Get hardware display id * * @return Display id