Some cleanup

This commit is contained in:
Gunnar Skjold
2024-05-23 22:20:01 +02:00
parent 3b155d78b1
commit 7ad97daf86
8 changed files with 20 additions and 91 deletions

View File

@@ -13,7 +13,6 @@ static const char HEADER_LOCATION[] PROGMEM = "Location";
static const char CACHE_CONTROL_NO_CACHE[] PROGMEM = "no-cache, no-store, must-revalidate";
static const char CONTENT_ENCODING_GZIP[] PROGMEM = "gzip";
static const char CACHE_1HR[] PROGMEM = "public, max-age=3600";
static const char CACHE_1DA[] PROGMEM = "public, max-age=86400";
static const char CACHE_1MO[] PROGMEM = "public, max-age=2630000";
static const char CACHE_1YR[] PROGMEM = "public, max-age=31536000";

View File

@@ -33,7 +33,11 @@
#include <HTTPClient.h>
#include <HTTPUpdate.h>
#include <ESP32SSDP.h>
#if defined(CONFIG_IDF_TARGET_ESP32C3)
#warning "Cloud disabled"
#else
#include "CloudConnector.h"
#endif
#else
#warning "Unsupported board type"
#endif
@@ -45,7 +49,7 @@ public:
AmsWebServer(uint8_t* buf, RemoteDebug* Debug, HwTools* hw, ResetDataContainer* rdc);
void setup(AmsConfiguration*, GpioConfig*, AmsData*, AmsDataStorage*, EnergyAccounting*, RealtimePlot*);
void loop();
#if defined(ESP32)
#if defined(_CLOUDCONNECTOR_H)
void setCloud(CloudConnector* cloud);
#endif
void setTimezone(Timezone* tz);
@@ -76,7 +80,7 @@ private:
RealtimePlot* rtp = NULL;
AmsMqttHandler* mqttHandler = NULL;
ConnectionHandler* ch = NULL;
#if defined(ESP32)
#if defined(_CLOUDCONNECTOR_H)
CloudConnector* cloud = NULL;
#endif
bool uploading = false;