File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
applications/services/power/power_service Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 99#define POWER_SETTINGS_VER_1 (1) // Previous version number
1010#define POWER_SETTINGS_VER (2) // New version number
1111
12- #define POWER_SETTINGS_PATH INT_PATH(POWER_SETTINGS_FILE_NAME)
13- #define POWER_SETTINGS_MAGIC (0x18)
12+ #define POWER_SETTINGS_PATH INT_PATH(POWER_SETTINGS_FILE_NAME)
13+ #define POWER_SETTINGS_MAGIC_V1 (0x19)
14+ #define POWER_SETTINGS_MAGIC (0x21)
1415
1516typedef struct {
1617 uint32_t auto_poweroff_delay_ms ;
@@ -42,10 +43,11 @@ void power_settings_load(PowerSettings* settings) {
4243 POWER_SETTINGS_PATH ,
4344 settings_previous ,
4445 sizeof (PowerSettingsPrevious ),
45- POWER_SETTINGS_MAGIC ,
46+ POWER_SETTINGS_MAGIC_V1 ,
4647 POWER_SETTINGS_VER_1 );
4748 // new settings initialization
4849 if (success ) {
50+ settings -> auto_poweroff_delay_ms = settings_previous -> auto_poweroff_delay_ms ;
4951 settings -> charge_supress_percent = 0 ;
5052 }
5153
You can’t perform that action at this time.
0 commit comments