Settings: about screen (#715)

This commit is contained in:
SG
2021-09-21 04:39:52 +10:00
committed by GitHub
parent 322bdf049d
commit 9b0aa0d6dc
6 changed files with 353 additions and 291 deletions

View File

@@ -0,0 +1,45 @@
#include <furi.h>
#include <dialogs/dialogs.h>
int32_t about_settings_app(void* p) {
const char* first_screen_text = "Product: Flipper Zero\n"
"Model: FZ.1\n"
"FCC ID: 2A2V6-FZIC\n"
"ID: 27624-FZ";
const char* second_screen_text = "Flipper Devices Inc\n"
"Suite B #551, 2803\n"
"Philadelphia Pike, Claymont\n"
"DE, USA 19703\n";
const char* third_screen_text = "For all compliance\n"
"certificates please visit\n"
"www.flipp.dev/compliance";
DialogsApp* dialogs = furi_record_open("dialogs");
DialogMessage* message = dialog_message_alloc();
do {
dialog_message_set_buttons(message, NULL, NULL, "Next");
dialog_message_set_text(message, first_screen_text, 0, 0, AlignLeft, AlignTop);
if(dialog_message_show(dialogs, message) != DialogMessageButtonRight) break;
dialog_message_set_text(message, second_screen_text, 0, 0, AlignLeft, AlignTop);
if(dialog_message_show(dialogs, message) != DialogMessageButtonRight) break;
dialog_message_set_text(message, third_screen_text, 0, 0, AlignLeft, AlignTop);
if(dialog_message_show(dialogs, message) != DialogMessageButtonRight) break;
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_icon(message, &I_Certification_128x64, 0, 0);
dialog_message_set_buttons(message, NULL, NULL, NULL);
dialog_message_show(dialogs, message);
} while(false);
dialog_message_free(message);
furi_record_close("dialogs");
return 0;
}

View File

@@ -51,6 +51,7 @@ extern void subghz_cli_init();
extern int32_t notification_settings_app(void* p);
extern int32_t storage_settings_app(void* p);
extern int32_t bt_settings_app(void* p);
extern int32_t about_settings_app(void* p);
const FlipperApplication FLIPPER_SERVICES[] = {
/* Services */
@@ -268,6 +269,10 @@ const FlipperApplication FLIPPER_SETTINGS_APPS[] = {
#ifdef SRV_BT
{.app = bt_settings_app, .name = "Bluetooth", .stack_size = 1024, .icon = NULL},
#endif
#ifdef APP_ABOUT
{.app = about_settings_app, .name = "About", .stack_size = 1024, .icon = NULL},
#endif
};
const size_t FLIPPER_SETTINGS_APPS_COUNT =

View File

@@ -32,6 +32,7 @@ APP_IRDA = 1
APP_LF_RFID = 1
APP_NFC = 1
APP_SUBGHZ = 1
APP_ABOUT = 1
# Plugins
APP_MUSIC_PLAYER = 1
@@ -138,6 +139,12 @@ SRV_GUI = 1
SRV_CLI = 1
endif
ifeq ($(APP_ABOUT), 1)
CFLAGS += -DAPP_ABOUT
SRV_INPUT = 1
SRV_GUI = 1
endif
SRV_LF_RFID ?= 0
ifeq ($(SRV_LF_RFID), 1)
CFLAGS += -DSRV_LF_RFID