Merge branch 'flipperdevices:dev' into dev

This commit is contained in:
Eng1n33r 2022-04-14 18:17:08 +03:00 committed by GitHub
commit aad4710ac3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 2 deletions

View file

@ -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");

View file

@ -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);

View file

@ -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;
}

View file

@ -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