From 7799431405100012f522ba5dfc46f1e19fc38717 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Fri, 12 Aug 2022 20:42:13 +0200 Subject: [PATCH 1/2] Remove unused files --- src/entsoe/PricesFromHubStream.cpp | 29 ----------------------------- src/entsoe/PricesFromHubStream.h | 19 ------------------- 2 files changed, 48 deletions(-) delete mode 100644 src/entsoe/PricesFromHubStream.cpp delete mode 100644 src/entsoe/PricesFromHubStream.h diff --git a/src/entsoe/PricesFromHubStream.cpp b/src/entsoe/PricesFromHubStream.cpp deleted file mode 100644 index f82f27c0..00000000 --- a/src/entsoe/PricesFromHubStream.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "PricesFromHubStream.h" - -int PricesFromHubStream::available() { - return 0; -} - -int PricesFromHubStream::read() { - return 0; -} - -int PricesFromHubStream::peek() { - return 0; -} - -void PricesFromHubStream::flush() { - -} - -size_t PricesFromHubStream::write(const uint8_t *buffer, size_t size) { - for(int i = 0; i < size; i++) { - write(buffer[i]); - } - return size; -} - -size_t PricesFromHubStream::write(uint8_t b) { - buf[pos++] = b; - return 1; -} diff --git a/src/entsoe/PricesFromHubStream.h b/src/entsoe/PricesFromHubStream.h deleted file mode 100644 index b672393d..00000000 --- a/src/entsoe/PricesFromHubStream.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _PRICESFROMHUBSTREAM_H -#define _PRICESFROMHUBSTREAM_H - -#include "Stream.h" - -class PricesFromHubStream: public Stream { -public: - int available(); - int read(); - int peek(); - void flush(); - size_t write(const uint8_t *buffer, size_t size); - size_t write(uint8_t); - - int pos = 0; - uint8_t buf[512]; -}; - -#endif From 998b9866045526da785b470934892b32a7a72037 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Fri, 12 Aug 2022 20:48:34 +0200 Subject: [PATCH 2/2] Adjusted modem sleep to a safer value --- src/AmsToMqttBridge.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AmsToMqttBridge.ino b/src/AmsToMqttBridge.ino index e40d4e25..19136294 100644 --- a/src/AmsToMqttBridge.ino +++ b/src/AmsToMqttBridge.ino @@ -1035,7 +1035,7 @@ void WiFi_connect() { } #endif WiFi.mode(WIFI_STA); - WiFi.setSleep(WIFI_PS_MAX_MODEM); + WiFi.setSleep(WIFI_PS_MIN_MODEM); #if defined(ESP32) if(wifi.power >= 195) WiFi.setTxPower(WIFI_POWER_19_5dBm);