From 3e9b08569c50ab46fe315bb311b33fba48c97728 Mon Sep 17 00:00:00 2001 From: lumapu Date: Mon, 12 Dec 2022 21:46:06 +0100 Subject: [PATCH] fix compilation errors (display, ESP32) --- src/platformio.ini | 2 ++ src/plugins/MonochromeDisplay/MonochromeDisplay.h | 13 ++++++++----- src/wifi/ahoywifi.cpp | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/platformio.ini b/src/platformio.ini index 63e3a10f..ba6c8be0 100644 --- a/src/platformio.ini +++ b/src/platformio.ini @@ -162,6 +162,7 @@ lib_deps = https://github.com/bertmelis/espMqttClient#v1.3.3 bblanchon/ArduinoJson olikraus/U8g2 + https://github.com/JChristensen/Timezone [env:esp32-wroom32-ssd1306] platform = espressif32 @@ -179,3 +180,4 @@ lib_deps = https://github.com/bertmelis/espMqttClient#v1.3.3 bblanchon/ArduinoJson https://github.com/ThingPulse/esp8266-oled-ssd1306.git + https://github.com/JChristensen/Timezone diff --git a/src/plugins/MonochromeDisplay/MonochromeDisplay.h b/src/plugins/MonochromeDisplay/MonochromeDisplay.h index 46a97224..0935d337 100644 --- a/src/plugins/MonochromeDisplay/MonochromeDisplay.h +++ b/src/plugins/MonochromeDisplay/MonochromeDisplay.h @@ -21,18 +21,21 @@ static uint8_t bmp_arrow[] DISP_PROGMEM = { B00000000, B00011100, B00011100, B00001110, B00001110, B11111110, B01111111, B01110000, B01110000, B00110000, B00111000, B00011000, B01111111, B00111111, - B00011110, B00001110, B00000110, B00000000, B00000000, B00000000, B00000000} ; + B00011110, B00001110, B00000110, B00000000, B00000000, B00000000, B00000000}; + +static TimeChangeRule CEST = {"CEST", Last, Sun, Mar, 2, 120}; // Central European Summer Time +static TimeChangeRule CET = {"CET ", Last, Sun, Oct, 3, 60}; // Central European Standard Tim template -class MonochromeDisplay : mCE({"CEST", Last, Sun, Mar, 2, 120}, {"CET ", Last, Sun, Oct, 3, 60}) { +class MonochromeDisplay { public: #if defined(ENA_NOKIA) - MonochromeDisplay() : mDisplay(U8G2_R0,5,4,16) { + MonochromeDisplay() : mDisplay(U8G2_R0, 5, 4, 16), mCE(CEST, CET) { mNewPayload = false; mExtra = 0; } #else // ENA_SSD1306 - MonochromeDisplay() : mDisplay(0x3c, SDA, SCL) { + MonochromeDisplay() : mDisplay(0x3c, SDA, SCL), mCE(CEST, CET) { mNewPayload = false; mExtra = 0; mRx = 0; @@ -276,7 +279,7 @@ class MonochromeDisplay : mCE({"CEST", Last, Sun, Mar, 2, 120}, {"CET ", Last, S bool mNewPayload; uint32_t *mUtcTs; HMSYSTEM *mSys; - Timezone mCE(CEST, CET); + Timezone mCE; }; #endif diff --git a/src/wifi/ahoywifi.cpp b/src/wifi/ahoywifi.cpp index 1ccede08..965c8197 100644 --- a/src/wifi/ahoywifi.cpp +++ b/src/wifi/ahoywifi.cpp @@ -141,7 +141,7 @@ bool ahoywifi::getNtpTime(void) { secsSince1900 |= (buf[43] ); *mUtcTimestamp = secsSince1900 - 2208988800UL; // UTC time - DPRINTLN(DBG_INFO, F("[NTP]: ") + ah::getDateTimeStr(*mUtcTimestamp) + F(" UTC")); + DPRINTLN(DBG_INFO, "[NTP]: " + ah::getDateTimeStr(*mUtcTimestamp) + " UTC"); return true; } else delay(10);