[FL-1329] Settings (#563)

* Menu: secondary menu rendering
* Manu: reset window position on enter to new menu
* App-loader: settings menu
* Applications: add settings app list
* App backlight-control: all work related to turning off the display is now in the notification app
* App notification: settings save and load
* Gui: variable item list module
* App: new notification settings app
* Display: backlight is now fully serviced in the notification app
* Gui: update variable item list module documentation
This commit is contained in:
SG
2021-07-05 08:03:56 +10:00
committed by GitHub
parent 7734fb4018
commit 29da0e360c
12 changed files with 815 additions and 68 deletions

View File

@@ -9,6 +9,7 @@
typedef enum {
NotificationLayerMessage,
InternalLayerMessage,
SaveSettingsMessage,
} NotificationAppMessageType;
typedef struct {
@@ -29,19 +30,27 @@ typedef struct {
Light light;
} NotificationLedLayer;
#define NOTIFICATION_SETTINGS_VERSION 0x01
#define NOTIFICATION_SETTINGS_PATH "notification_settings"
typedef struct {
uint8_t version;
float display_brightness;
float led_brightness;
float speaker_volume;
uint32_t display_off_delay_ms;
bool vibro_on;
} NotificationSettings;
struct NotificationApp {
osMessageQueueId_t queue;
PubSub* event_record;
osTimerId_t display_timer;
NotificationLedLayer display;
NotificationLedLayer led[NOTIFICATION_LED_COUNT];
NotificationSettings settings;
};
};
void notification_message_save_settings(NotificationApp* app);