Show OTP flipper region on debug and about screens

but keep region zero for ble and usb hardware info report
This commit is contained in:
MX 2022-12-29 01:43:24 +03:00
parent a850aa8f2c
commit 4e3506ab2e
No known key found for this signature in database
GPG key ID: 6C4C311DFD4B4AB5
5 changed files with 29 additions and 7 deletions

View file

@ -42,7 +42,7 @@ void desktop_debug_render(Canvas* canvas, void* model) {
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_version_get_hw_region_name_otp(),
furi_hal_region_get_name(),
my_name ? my_name : "Unknown");
canvas_draw_str(canvas, 0, 19 + STATUS_BAR_Y_SHIFT, buffer);

View file

@ -120,7 +120,7 @@ static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage*
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_version_get_hw_region_name_otp(),
furi_hal_region_get_name(),
my_name ? my_name : "Unknown");

View file

@ -1391,6 +1391,8 @@ Function,+,furi_hal_version_get_hw_connect,uint8_t,
Function,+,furi_hal_version_get_hw_display,FuriHalVersionDisplay,
Function,+,furi_hal_version_get_hw_region,FuriHalVersionRegion,
Function,+,furi_hal_version_get_hw_region_name,const char*,
Function,+,furi_hal_version_get_hw_region_name_otp,const char*,
Function,+,furi_hal_version_get_hw_region_otp,FuriHalVersionRegion,
Function,+,furi_hal_version_get_hw_target,uint8_t,
Function,+,furi_hal_version_get_hw_timestamp,uint32_t,
Function,+,furi_hal_version_get_hw_version,uint8_t,

1 entry status name type params
1391 Function + furi_hal_version_get_hw_display FuriHalVersionDisplay
1392 Function + furi_hal_version_get_hw_region FuriHalVersionRegion
1393 Function + furi_hal_version_get_hw_region_name const char*
1394 Function + furi_hal_version_get_hw_region_name_otp const char*
1395 Function + furi_hal_version_get_hw_region_otp FuriHalVersionRegion
1396 Function + furi_hal_version_get_hw_target uint8_t
1397 Function + furi_hal_version_get_hw_timestamp uint32_t
1398 Function + furi_hal_version_get_hw_version uint8_t

View file

@ -266,8 +266,16 @@ FuriHalVersionRegion furi_hal_version_get_hw_region() {
return FuriHalVersionRegionUnknown;
}
FuriHalVersionRegion furi_hal_version_get_hw_region_otp() {
return furi_hal_version.board_region;
}
const char* furi_hal_version_get_hw_region_name() {
switch(furi_hal_version_get_hw_region()) {
return "R00";
}
const char* furi_hal_version_get_hw_region_name_otp() {
switch(furi_hal_version_get_hw_region_otp()) {
case FuriHalVersionRegionUnknown:
return "R00";
case FuriHalVersionRegionEuRu:

View file

@ -103,17 +103,29 @@ FuriHalVersionColor furi_hal_version_get_hw_color();
*/
uint8_t furi_hal_version_get_hw_connect();
/** Get hardware region
/** Get hardware region (fake) = 0
*
* @return Hardware Region
* @return Hardware Region (fake)
*/
FuriHalVersionRegion furi_hal_version_get_hw_region();
/** Get hardware region name
/** Get hardware region name (fake) = R00
*
* @return Hardware Region name (fake)
*/
const char* furi_hal_version_get_hw_region_name();
/** Get hardware region (OTP)
*
* @return Hardware Region
*/
FuriHalVersionRegion furi_hal_version_get_hw_region_otp();
/** Get hardware region name (OTP)
*
* @return Hardware Region name
*/
const char* furi_hal_version_get_hw_region_name();
const char* furi_hal_version_get_hw_region_name_otp();
/** Get hardware display id
*