mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-23 21:34:35 +03:00
[FL-3429] About: cn,tw,mx certification information (#3318)
This commit is contained in:
parent
0084443ed7
commit
c9e3f20314
@ -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;
|
||||
|
BIN
assets/icons/About/CertificationChina0_121x41.png
Normal file
BIN
assets/icons/About/CertificationChina0_121x41.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/icons/About/CertificationChina1_122x47.png
Normal file
BIN
assets/icons/About/CertificationChina1_122x47.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
BIN
assets/icons/About/CertificationMexico_98x41.png
Normal file
BIN
assets/icons/About/CertificationMexico_98x41.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
BIN
assets/icons/About/CertificationTaiwan_33x32.png
Normal file
BIN
assets/icons/About/CertificationTaiwan_33x32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
@ -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,
|
||||
|
|
@ -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";
|
||||
}
|
@ -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,
|
||||
|
|
@ -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";
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user