PineTimeStyle weather display (#1459)
Weather display for PineTimeStyle Documentation : https://wiki.pine64.org/wiki/PineTimeStyle and https://wiki.pine64.org/wiki/Infinitime-Weather
This commit is contained in:
@@ -39,12 +39,14 @@ namespace Pinetime {
|
||||
Pink
|
||||
};
|
||||
enum class PTSGaugeStyle : uint8_t { Full, Half, Numeric };
|
||||
enum class PTSWeather : uint8_t { On, Off };
|
||||
|
||||
struct PineTimeStyle {
|
||||
Colors ColorTime = Colors::Teal;
|
||||
Colors ColorBar = Colors::Teal;
|
||||
Colors ColorBG = Colors::Black;
|
||||
PTSGaugeStyle gaugeStyle = PTSGaugeStyle::Full;
|
||||
PTSWeather weatherEnable = PTSWeather::Off;
|
||||
};
|
||||
|
||||
struct WatchFaceInfineat {
|
||||
@@ -146,6 +148,16 @@ namespace Pinetime {
|
||||
return settings.PTS.gaugeStyle;
|
||||
};
|
||||
|
||||
void SetPTSWeather(PTSWeather weatherEnable) {
|
||||
if (weatherEnable != settings.PTS.weatherEnable)
|
||||
settingsChanged = true;
|
||||
settings.PTS.weatherEnable = weatherEnable;
|
||||
};
|
||||
|
||||
PTSWeather GetPTSWeather() const {
|
||||
return settings.PTS.weatherEnable;
|
||||
};
|
||||
|
||||
void SetAppMenu(uint8_t menu) {
|
||||
appMenu = menu;
|
||||
};
|
||||
@@ -267,7 +279,7 @@ namespace Pinetime {
|
||||
private:
|
||||
Pinetime::Controllers::FS& fs;
|
||||
|
||||
static constexpr uint32_t settingsVersion = 0x0004;
|
||||
static constexpr uint32_t settingsVersion = 0x0005;
|
||||
|
||||
struct SettingsData {
|
||||
uint32_t version = settingsVersion;
|
||||
|
Reference in New Issue
Block a user