Add auto-sleep timeout setting and handle it in loop
Incremented settings count, added autoSleepMinutes to CrossPointSettings, updated save/load functions, and integrated auto-sleep logic based on the new setting.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
// Define the static settings list
|
||||
namespace {
|
||||
constexpr int settingsCount = 13;
|
||||
constexpr int settingsCount = 14;
|
||||
const SettingInfo settingsList[settingsCount] = {
|
||||
// Should match with SLEEP_SCREEN_MODE
|
||||
{"Sleep Screen", SettingType::ENUM, &CrossPointSettings::sleepScreen, {"Dark", "Light", "Custom", "Cover"}},
|
||||
@@ -35,6 +35,10 @@ const SettingInfo settingsList[settingsCount] = {
|
||||
{"Reader Font Size", SettingType::ENUM, &CrossPointSettings::fontSize, {"Small", "Medium", "Large", "X Large"}},
|
||||
{"Reader Line Spacing", SettingType::ENUM, &CrossPointSettings::lineSpacing, {"Tight", "Normal", "Wide"}},
|
||||
{"Cover Art Picker", SettingType::TOGGLE, &CrossPointSettings::useCoverArtPicker, {}},
|
||||
{"Auto Sleep Timeout",
|
||||
SettingType::ENUM,
|
||||
&CrossPointSettings::autoSleepMinutes,
|
||||
{"5 min", "10 min", "15 min", "20 min", "30 min", "60 min", "Never"}},
|
||||
{"Bluetooth", SettingType::TOGGLE, &CrossPointSettings::bluetoothEnabled, {}},
|
||||
{"Check for updates", SettingType::ACTION, nullptr, {}},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user