fix: resolve compiler warnings (from PR #8 by @waltje)

- weather.cpp: StaticJsonDocument → JsonDocument (ArduinoJson v7 API)
- display.cpp: daylightStr buffer 16 → 32 bytes (suppress GCC sprintf warning)
- ntp_client.cpp: remove unused weekday variable

Applied manually due to repo layout mismatch in original PR.

Co-authored-by: waltje <waltje@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Petrochenko
2026-05-14 17:34:35 +01:00
co-authored by waltje Claude Sonnet 4.6
parent 09b8680408
commit 8d404506c4
4 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ void ICACHE_FLASH_ATTR displaySunTimes() {
int daylightHours = daylightMinutes / 60;
int daylightMins = daylightMinutes % 60;
char daylightStr[16];
char daylightStr[32];
sprintf(daylightStr, "Day %dh %dm", daylightHours, daylightMins);
display.setTextSize(1);
@@ -16,7 +16,6 @@ bool ICACHE_FLASH_ATTR isDST(unsigned long epochTime) {
int month = timeinfo->tm_mon + 1; // 1-12
int day = timeinfo->tm_mday; // 1-31
int weekday = timeinfo->tm_wday; // 0=Sunday
int hour = timeinfo->tm_hour;
// Not DST: November - February
+1 -1
View File
@@ -28,7 +28,7 @@ void ICACHE_FLASH_ATTR onWeatherResponse(void* optParm, AsyncHTTPRequest* reques
Serial.printf("Weather response: %d bytes\n", payload.length());
// Parse JSON response
StaticJsonDocument<1536> doc;
JsonDocument doc;
DeserializationError error = deserializeJson(doc, payload);
if (!error) {