Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime into evergreen22-airplane-mode
# Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/Messages.h # src/displayapp/screens/settings/Settings.cpp
This commit is contained in:
@@ -18,7 +18,23 @@ namespace Pinetime {
|
||||
Shake = 3,
|
||||
};
|
||||
enum class Colors : uint8_t {
|
||||
White, Silver, Gray, Black, Red, Maroon, Yellow, Olive, Lime, Green, Cyan, Teal, Blue, Navy, Magenta, Purple, Orange
|
||||
White,
|
||||
Silver,
|
||||
Gray,
|
||||
Black,
|
||||
Red,
|
||||
Maroon,
|
||||
Yellow,
|
||||
Olive,
|
||||
Lime,
|
||||
Green,
|
||||
Cyan,
|
||||
Teal,
|
||||
Blue,
|
||||
Navy,
|
||||
Magenta,
|
||||
Purple,
|
||||
Orange
|
||||
};
|
||||
struct PineTimeStyle {
|
||||
Colors ColorTime = Colors::Teal;
|
||||
@@ -170,18 +186,29 @@ namespace Pinetime {
|
||||
}
|
||||
settings.brightLevel = level;
|
||||
};
|
||||
|
||||
Controllers::BrightnessController::Levels GetBrightness() const {
|
||||
return settings.brightLevel;
|
||||
};
|
||||
|
||||
void SetStepsGoal( uint32_t goal ) {
|
||||
if ( goal != settings.stepsGoal ) {
|
||||
void SetStepsGoal(uint32_t goal) {
|
||||
if (goal != settings.stepsGoal) {
|
||||
settingsChanged = true;
|
||||
}
|
||||
settings.stepsGoal = goal;
|
||||
};
|
||||
|
||||
uint32_t GetStepsGoal() const { return settings.stepsGoal; };
|
||||
uint32_t GetStepsGoal() const {
|
||||
return settings.stepsGoal;
|
||||
};
|
||||
|
||||
void SetAirplaneMode(bool mode) {
|
||||
airplaneMode = mode;
|
||||
};
|
||||
|
||||
bool GetAirplaneMode() const {
|
||||
return airplaneMode;
|
||||
};
|
||||
|
||||
private:
|
||||
Pinetime::Controllers::FS& fs;
|
||||
@@ -210,6 +237,10 @@ namespace Pinetime {
|
||||
|
||||
uint8_t appMenu = 0;
|
||||
uint8_t settingsMenu = 0;
|
||||
/* airplaneMode is intentionally not saved with the other watch settings and initialized
|
||||
* to off (false) on every boot because we always want ble to be enabled on startup
|
||||
*/
|
||||
bool airplaneMode = false;
|
||||
|
||||
void LoadSettingsFromFile();
|
||||
void SaveSettingsToFile();
|
||||
|
Reference in New Issue
Block a user