From 38e792b88d7e8726547eb2a82e441e0936402aca Mon Sep 17 00:00:00 2001 From: samuelbles07 Date: Sat, 30 Nov 2024 04:45:04 +0700 Subject: [PATCH] if guard uri for esp8266 --- src/AgApiClient.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/AgApiClient.h b/src/AgApiClient.h index 167a4eb4..9f39cebf 100644 --- a/src/AgApiClient.h +++ b/src/AgApiClient.h @@ -20,7 +20,12 @@ class AgApiClient : public PrintLog { private: Configuration &config; AirGradient *ag; +#ifdef ESP8266 + // ESP8266 not support HTTPS + String apiRoot = "http://hw.airgradient.com"; +#else String apiRoot = "https://hw.airgradient.com"; +#endif bool apiRootChanged = false; // Indicate if setApiRoot() is called bool getConfigFailed;