From fc06dba53758bf7f77f13f05062fdac4c9f46280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Mon, 29 Jul 2024 22:10:27 +0200 Subject: [PATCH 1/2] Update WiFiClock.ino Log HTTP error code to serial console --- examples/SquareLine/v8/WiFiClock/WiFiClock.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/SquareLine/v8/WiFiClock/WiFiClock.ino b/examples/SquareLine/v8/WiFiClock/WiFiClock.ino index 8f7bf1aa..ae2ae11f 100644 --- a/examples/SquareLine/v8/WiFiClock/WiFiClock.ino +++ b/examples/SquareLine/v8/WiFiClock/WiFiClock.ino @@ -312,7 +312,7 @@ void ParseWeather(String url) Serial.printf("Weather: %s\n", Weather); Serial.printf("temperature: %d\n", temperature); } else { - Serial.printf("ERROR: HTTP_CODE Weather\n"); + Serial.printf("ERROR: HTTP code %d Weather\n", httpGet); } } else { Serial.printf("ERROR: httpGet Weather\n"); @@ -338,7 +338,7 @@ void Parselatlon(String url) Serial.printf("lat: %s\n", lat); Serial.printf("lon: %s\n", lon); } else { - Serial.printf("ERROR: HTTP_CODE latlon\n"); + Serial.printf("ERROR: OpenWeather API --> HTTP code %d\n", httpGet); } } else { Serial.printf("ERROR: httpGet latlon\n"); From 92197c541f2aacb014df19eebbd39c5b288c80d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Mon, 29 Jul 2024 22:13:21 +0200 Subject: [PATCH 2/2] Update WiFiClock.ino --- examples/SquareLine/v8/WiFiClock/WiFiClock.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/SquareLine/v8/WiFiClock/WiFiClock.ino b/examples/SquareLine/v8/WiFiClock/WiFiClock.ino index ae2ae11f..f87d2f28 100644 --- a/examples/SquareLine/v8/WiFiClock/WiFiClock.ino +++ b/examples/SquareLine/v8/WiFiClock/WiFiClock.ino @@ -312,7 +312,7 @@ void ParseWeather(String url) Serial.printf("Weather: %s\n", Weather); Serial.printf("temperature: %d\n", temperature); } else { - Serial.printf("ERROR: HTTP code %d Weather\n", httpGet); + Serial.printf("ERROR: [ParseWeather] OpenWeather API --> HTTP code %d\n", httpGet); } } else { Serial.printf("ERROR: httpGet Weather\n"); @@ -338,7 +338,7 @@ void Parselatlon(String url) Serial.printf("lat: %s\n", lat); Serial.printf("lon: %s\n", lon); } else { - Serial.printf("ERROR: OpenWeather API --> HTTP code %d\n", httpGet); + Serial.printf("ERROR: [Parselatlon] OpenWeather API --> HTTP code %d\n", httpGet); } } else { Serial.printf("ERROR: httpGet latlon\n");