feat: always on display

This commit is contained in:
KaffeinatedKat
2023-09-29 21:00:07 -06:00
committed by JF
parent f8f8993fac
commit 20ac7e8df3
5 changed files with 43 additions and 9 deletions

View File

@@ -214,6 +214,17 @@ namespace Pinetime {
return settings.screenTimeOut;
};
void SetAlwaysOnDisplay(bool state) {
if (state != settings.alwaysOnDisplay) {
settingsChanged = true;
}
settings.alwaysOnDisplay = state;
};
bool GetAlwaysOnDisplay() const {
return settings.alwaysOnDisplay;
};
void SetShakeThreshold(uint16_t thresh) {
if (settings.shakeWakeThreshold != thresh) {
settings.shakeWakeThreshold = thresh;
@@ -286,13 +297,15 @@ namespace Pinetime {
private:
Pinetime::Controllers::FS& fs;
static constexpr uint32_t settingsVersion = 0x0007;
static constexpr uint32_t settingsVersion = 0x0008;
struct SettingsData {
uint32_t version = settingsVersion;
uint32_t stepsGoal = 10000;
uint32_t screenTimeOut = 15000;
bool alwaysOnDisplay = false;
ClockType clockType = ClockType::H24;
WeatherFormat weatherFormat = WeatherFormat::Metric;
Notification notificationStatus = Notification::On;