mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-23 05:24:46 -07:00
Merge Power service refactor, rework power settings
- Merge OFW power service refactor stuff - Move charge cap variable to service - Mirror settings usage of desktop and bt services for power settings - Proper power settings struct, no more weird settings pubsub - Load power settings on SD insert - Set shutdown on idle time in main power settings menu, not in submenu - Update battery icon visibility in power tick event - Remove unused power functions (power_trigger_ui_update(), power_set_battery_icon_enabled())
This commit is contained in:
@@ -1,18 +1,10 @@
|
||||
#include <toolbox/saved_struct.h>
|
||||
#include <storage/storage.h>
|
||||
#pragma once
|
||||
|
||||
#define POWER_SETTINGS_VER (1)
|
||||
#include <stdint.h>
|
||||
|
||||
#define POWER_SETTINGS_MAGIC (0x21)
|
||||
typedef struct {
|
||||
uint32_t shutdown_idle_delay_ms;
|
||||
} PowerSettings;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool SAVE_POWER_SETTINGS(uint32_t* x);
|
||||
|
||||
bool LOAD_POWER_SETTINGS(uint32_t* x);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
void power_settings_load(PowerSettings* settings);
|
||||
void power_settings_save(const PowerSettings* settings);
|
||||
|
||||
Reference in New Issue
Block a user