mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-30 21:58:55 -07:00
Option to disable poweroff while locked --nobuild
This commit is contained in:
@@ -15,6 +15,7 @@ XtremeSettings xtreme_settings = {
|
||||
.lock_on_boot = false, // OFF
|
||||
.bad_pins_format = false, // OFF
|
||||
.allow_locked_rpc_commands = false, // OFF
|
||||
.lockscreen_poweroff = true, // ON
|
||||
.lockscreen_time = true, // ON
|
||||
.lockscreen_seconds = false, // OFF
|
||||
.lockscreen_date = true, // ON
|
||||
@@ -89,6 +90,10 @@ void XTREME_SETTINGS_LOAD() {
|
||||
x->lock_on_boot = b;
|
||||
}
|
||||
flipper_format_rewind(file);
|
||||
if(flipper_format_read_bool(file, "lockscreen_poweroff", &b, 1)) {
|
||||
x->lockscreen_poweroff = b;
|
||||
}
|
||||
flipper_format_rewind(file);
|
||||
if(flipper_format_read_bool(file, "lockscreen_time", &b, 1)) {
|
||||
x->lockscreen_time = b;
|
||||
}
|
||||
@@ -216,6 +221,7 @@ void XTREME_SETTINGS_SAVE() {
|
||||
flipper_format_write_bool(
|
||||
file, "allow_locked_rpc_commands", &x->allow_locked_rpc_commands, 1);
|
||||
flipper_format_write_bool(file, "lock_on_boot", &x->lock_on_boot, 1);
|
||||
flipper_format_write_bool(file, "lockscreen_poweroff", &x->lockscreen_poweroff, 1);
|
||||
flipper_format_write_bool(file, "lockscreen_time", &x->lockscreen_time, 1);
|
||||
flipper_format_write_bool(file, "lockscreen_seconds", &x->lockscreen_seconds, 1);
|
||||
flipper_format_write_bool(file, "lockscreen_date", &x->lockscreen_date, 1);
|
||||
|
||||
@@ -62,6 +62,7 @@ typedef struct {
|
||||
bool lock_on_boot;
|
||||
bool bad_pins_format;
|
||||
bool allow_locked_rpc_commands;
|
||||
bool lockscreen_poweroff;
|
||||
bool lockscreen_time;
|
||||
bool lockscreen_seconds;
|
||||
bool lockscreen_date;
|
||||
|
||||
Reference in New Issue
Block a user