mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-11 23:38:11 -07:00
Revert "Revert "Feature: Custom user set charging cap (#265)""
This reverts commit 31f624d662.
This commit is contained in:
@@ -29,6 +29,7 @@ XtremeSettings xtreme_settings = {
|
||||
.bad_bt = false, // USB
|
||||
.bad_bt_remember = false, // OFF
|
||||
.butthurt_timer = 21600, // 6 H
|
||||
.charge_cap = 100, // 100%
|
||||
.rgb_backlight = false, // OFF
|
||||
};
|
||||
|
||||
@@ -90,6 +91,8 @@ void XTREME_SETTINGS_LOAD() {
|
||||
flipper_format_rewind(file);
|
||||
flipper_format_read_int32(file, "butthurt_timer", &x->butthurt_timer, 1);
|
||||
flipper_format_rewind(file);
|
||||
flipper_format_read_uint32(file, "charge_cap", &x->charge_cap, 1);
|
||||
flipper_format_rewind(file);
|
||||
flipper_format_read_bool(file, "rgb_backlight", &x->rgb_backlight, 1);
|
||||
}
|
||||
flipper_format_free(file);
|
||||
@@ -126,6 +129,7 @@ void XTREME_SETTINGS_SAVE() {
|
||||
flipper_format_write_bool(file, "bad_bt", &x->bad_bt, 1);
|
||||
flipper_format_write_bool(file, "bad_bt_remember", &x->bad_bt_remember, 1);
|
||||
flipper_format_write_int32(file, "butthurt_timer", &x->butthurt_timer, 1);
|
||||
flipper_format_write_uint32(file, "charge_cap", &x->charge_cap, 1);
|
||||
flipper_format_write_bool(file, "rgb_backlight", &x->rgb_backlight, 1);
|
||||
}
|
||||
flipper_format_free(file);
|
||||
|
||||
@@ -37,6 +37,7 @@ typedef struct {
|
||||
bool bad_bt;
|
||||
bool bad_bt_remember;
|
||||
int32_t butthurt_timer;
|
||||
uint32_t charge_cap;
|
||||
bool rgb_backlight;
|
||||
} XtremeSettings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user