Fix time synchronization (1970 00:00:00) issue

This commit is contained in:
Daniel Eichhorn
2017-08-17 08:23:00 +02:00
parent 4473b5c7bd
commit 0cd773058c
2 changed files with 5 additions and 6 deletions

View File

@@ -156,6 +156,7 @@ void setup() {
gfx.fillBuffer(MINI_BLACK);
gfx.commit();
connectWifi();
ts.begin();
@@ -248,8 +249,7 @@ void loop() {
// Update the internet based information and update screen
void updateData() {
WiFi.mode(WIFI_STA);
connectWifi();
gfx.fillBuffer(MINI_BLACK);
gfx.setFont(ArialRoundedMTBold_14);
@@ -275,7 +275,6 @@ void updateData() {
astronomyClient = nullptr;
moonAgeImage = String((char) (65 + 26 * (((15 + astronomy.moonAge.toInt()) % 30) / 30.0)));
WiFi.mode(WIFI_OFF);
delay(1000);
}