mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 06:50:21 +00:00
[FL-2428] region name in about (#1113)
This commit is contained in:
parent
a5cc3453c8
commit
c078bbcb0e
4 changed files with 24 additions and 2 deletions
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue