Skip to content

Commit

Permalink
if guard uri for esp8266
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbles07 committed Nov 29, 2024
1 parent aeee0ca commit 38e792b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/AgApiClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 38e792b

Please sign in to comment.