Add WIP weather stuff

This commit is contained in:
Lewis Jackson 2023-06-01 17:22:37 +03:00
parent 07e83e7557
commit 23b1328cba
5 changed files with 42 additions and 18 deletions

View file

@ -5,6 +5,8 @@
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
RTC_DATA_ATTR uint64_t WatchFacePages::Weather::m_lastSyncTime = 0;
WatchFacePages::Weather::Weather(WatchyDisplay & display, WatchFeatures::WatchFeatures & features)
: m_display(display), m_features(features)
{
@ -23,4 +25,17 @@ void WatchFacePages::Weather::DrawPage(bool partialRefresh)
m_display.setFullWindow();
m_display.fillScreen(GxEPD_WHITE);
m_display.display(partialRefresh);
}
void WatchFacePages::Weather::Resync()
{
// if(!m_features.wifi.Connect()) {
// return;
// }
// uint64_t currentTime = m_features.rtc.GetTimestamp();
// if(m_lastSyncTime == 0 || m_lastSyncTime + 60 * 60 * 1000 < millis()) {
// m_lastSyncTime = millis();
// }
}

View file

@ -20,7 +20,9 @@ public:
void DrawPage(bool partialRefresh = false) override;
private:
void Resync();
WatchyDisplay & m_display;
WatchFeatures::WatchFeatures & m_features;
static RTC_DATA_ATTR uint64_t m_lastSyncTime;
};