[FL-3429] About: cn,tw,mx certification information (#3318)

This commit is contained in:
あく 2023-12-26 15:12:17 +09:00 committed by GitHub
parent 0084443ed7
commit c9e3f20314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 96 additions and 27 deletions

View File

@ -11,7 +11,7 @@
typedef DialogMessageButton (*AboutDialogScreen)(DialogsApp* dialogs, DialogMessage* message);
static DialogMessageButton product_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_product(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
FuriString* screen_header = furi_string_alloc_printf(
@ -31,8 +31,6 @@ static DialogMessageButton product_screen(DialogsApp* dialogs, DialogMessage* me
dialog_message_set_text(
message, furi_string_get_cstr(screen_text), 0, 26, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
furi_string_free(screen_header);
furi_string_free(screen_text);
@ -40,7 +38,7 @@ static DialogMessageButton product_screen(DialogsApp* dialogs, DialogMessage* me
return result;
}
static DialogMessageButton address_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_address(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
const char* screen_text = "Flipper Devices Inc\n"
@ -50,12 +48,11 @@ static DialogMessageButton address_screen(DialogsApp* dialogs, DialogMessage* me
dialog_message_set_text(message, screen_text, 0, 0, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
return result;
}
static DialogMessageButton compliance_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_compliance(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
const char* screen_text = "For all compliance\n"
@ -64,35 +61,71 @@ static DialogMessageButton compliance_screen(DialogsApp* dialogs, DialogMessage*
dialog_message_set_text(message, screen_text, 0, 0, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
return result;
}
static DialogMessageButton icon1_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_icon1(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_Certification1_103x56, 13, 0);
result = dialog_message_show(dialogs, message);
dialog_message_set_icon(message, NULL, 0, 0);
return result;
}
static DialogMessageButton icon2_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_icon2(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_Certification2_46x33, 15, 10);
dialog_message_set_text(
message, furi_hal_version_get_mic_id(), 63, 27, AlignLeft, AlignCenter);
result = dialog_message_show(dialogs, message);
dialog_message_set_icon(message, NULL, 0, 0);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
return result;
}
static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_cert_china_0(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_CertificationChina0_121x41, 3, 3);
result = dialog_message_show(dialogs, message);
return result;
}
static DialogMessageButton about_screen_cert_china_1(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_CertificationChina1_122x47, 3, 3);
dialog_message_set_text(
message, furi_hal_version_get_srrc_id(), 55, 11, AlignLeft, AlignBottom);
result = dialog_message_show(dialogs, message);
return result;
}
static DialogMessageButton about_screen_cert_taiwan(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_CertificationTaiwan_33x32, 3, 10);
dialog_message_set_text(
message, furi_hal_version_get_ncc_id(), 39, 30, AlignLeft, AlignBottom);
result = dialog_message_show(dialogs, message);
return result;
}
static DialogMessageButton about_screen_cert_mexico(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_CertificationMexico_98x41, 17, 4);
result = dialog_message_show(dialogs, message);
return result;
}
static DialogMessageButton about_screen_hw_version(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
FuriString* buffer;
buffer = furi_string_alloc();
@ -118,14 +151,12 @@ static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage*
dialog_message_set_header(message, "HW Version Info:", 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, furi_string_get_cstr(buffer), 0, 13, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
furi_string_free(buffer);
return result;
}
static DialogMessageButton fw_version_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_fw_version(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
FuriString* buffer;
buffer = furi_string_alloc();
@ -157,21 +188,23 @@ static DialogMessageButton fw_version_screen(DialogsApp* dialogs, DialogMessage*
dialog_message_set_header(message, "FW Version Info:", 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, furi_string_get_cstr(buffer), 0, 13, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
furi_string_free(buffer);
return result;
}
const AboutDialogScreen about_screens[] = {
product_screen,
compliance_screen,
address_screen,
icon1_screen,
icon2_screen,
hw_version_screen,
fw_version_screen};
about_screen_product,
about_screen_compliance,
about_screen_address,
about_screen_icon1,
about_screen_icon2,
about_screen_cert_china_0,
about_screen_cert_china_1,
about_screen_cert_taiwan,
about_screen_cert_mexico,
about_screen_hw_version,
about_screen_fw_version};
int32_t about_settings_app(void* p) {
UNUSED(p);
@ -201,6 +234,10 @@ int32_t about_settings_app(void* p) {
screen_result = about_screens[screen_index](dialogs, message);
dialog_message_set_icon(message, NULL, 0, 0);
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
if(screen_result == DialogMessageButtonLeft) {
if(screen_index <= 0) {
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,50.0,,
Version,+,50.1,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -1330,7 +1330,9 @@ Function,+,furi_hal_version_get_mic_id,const char*,
Function,+,furi_hal_version_get_model_code,const char*,
Function,+,furi_hal_version_get_model_name,const char*,
Function,+,furi_hal_version_get_name_ptr,const char*,
Function,+,furi_hal_version_get_ncc_id,const char*,
Function,+,furi_hal_version_get_otp_version,FuriHalVersionOtpVersion,
Function,+,furi_hal_version_get_srrc_id,const char*,
Function,-,furi_hal_version_init,void,
Function,+,furi_hal_version_uid,const uint8_t*,
Function,+,furi_hal_version_uid_size,size_t,

1 entry status name type params
2 Version + 50.0 50.1
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
1330 Function + furi_hal_version_get_model_code const char*
1331 Function + furi_hal_version_get_model_name const char*
1332 Function + furi_hal_version_get_name_ptr const char*
1333 Function + furi_hal_version_get_ncc_id const char*
1334 Function + furi_hal_version_get_otp_version FuriHalVersionOtpVersion
1335 Function + furi_hal_version_get_srrc_id const char*
1336 Function - furi_hal_version_init void
1337 Function + furi_hal_version_uid const uint8_t*
1338 Function + furi_hal_version_uid_size size_t

View File

@ -23,3 +23,11 @@ const char* furi_hal_version_get_ic_id() {
const char* furi_hal_version_get_mic_id() {
return "Pending";
}
const char* furi_hal_version_get_srrc_id() {
return "Pending";
}
const char* furi_hal_version_get_ncc_id() {
return "Pending";
}

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,50.0,,
Version,+,50.1,,
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
@ -1526,7 +1526,9 @@ Function,+,furi_hal_version_get_mic_id,const char*,
Function,+,furi_hal_version_get_model_code,const char*,
Function,+,furi_hal_version_get_model_name,const char*,
Function,+,furi_hal_version_get_name_ptr,const char*,
Function,+,furi_hal_version_get_ncc_id,const char*,
Function,+,furi_hal_version_get_otp_version,FuriHalVersionOtpVersion,
Function,+,furi_hal_version_get_srrc_id,const char*,
Function,-,furi_hal_version_init,void,
Function,+,furi_hal_version_uid,const uint8_t*,
Function,+,furi_hal_version_uid_size,size_t,

1 entry status name type params
2 Version + 50.0 50.1
3 Header + applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h
4 Header + applications/services/bt/bt_service/bt.h
5 Header + applications/services/cli/cli.h
1526 Function + furi_hal_version_get_model_code const char*
1527 Function + furi_hal_version_get_model_name const char*
1528 Function + furi_hal_version_get_name_ptr const char*
1529 Function + furi_hal_version_get_ncc_id const char*
1530 Function + furi_hal_version_get_otp_version FuriHalVersionOtpVersion
1531 Function + furi_hal_version_get_srrc_id const char*
1532 Function - furi_hal_version_init void
1533 Function + furi_hal_version_uid const uint8_t*
1534 Function + furi_hal_version_uid_size size_t

View File

@ -23,3 +23,11 @@ const char* furi_hal_version_get_ic_id() {
const char* furi_hal_version_get_mic_id() {
return "210-175991";
}
const char* furi_hal_version_get_srrc_id() {
return "2023DJ16420";
}
const char* furi_hal_version_get_ncc_id() {
return "CCAJ23LP34D0T3";
}

View File

@ -92,6 +92,18 @@ const char* furi_hal_version_get_ic_id();
*/
const char* furi_hal_version_get_mic_id();
/** Get SRRC id
*
* @return SRRC id as C-string
*/
const char* furi_hal_version_get_srrc_id();
/** Get NCC id
*
* @return NCC id as C-string
*/
const char* furi_hal_version_get_ncc_id();
/** Get OTP version
*
* @return OTP Version