Fix Power Settings

This commit is contained in:
RogueMaster
2022-09-16 14:33:52 -04:00
parent da658c6b9f
commit c7b9357a30
3 changed files with 18 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
#include <gui/modules/popup.h>
#include "views/power_off.h"
// #include "power/power_settings.h"
#include "applications/settings/power_settings_app/power_settings.h"
#include "views/power_unplug_usb.h"
#include <notification/notification_messages.h>

View File

@@ -0,0 +1,16 @@
#include <toolbox/saved_struct.h>
#include <storage/storage.h>
#include "power_settings_filename.h"
#define POWER_SETTINGS_VER (1)
#define POWER_SETTINGS_PATH INT_PATH(POWER_SETTINGS_FILE_NAME)
#define POWER_SETTINGS_MAGIC (0x21)
#define SAVE_POWER_SETTINGS(x) \
saved_struct_save( \
POWER_SETTINGS_PATH, (x), sizeof(uint32_t), POWER_SETTINGS_MAGIC, POWER_SETTINGS_VER)
#define LOAD_POWER_SETTINGS(x) \
saved_struct_load( \
POWER_SETTINGS_PATH, (x), sizeof(uint32_t), POWER_SETTINGS_MAGIC, POWER_SETTINGS_VER)

View File

@@ -12,7 +12,7 @@
#include <gui/modules/dialog_ex.h>
#include <gui/modules/variable_item_list.h>
// #include "power/power_settings.h"
#include "power_settings.h"
#include "scenes/power_settings_scene.h"
typedef struct {