diff --git a/lib/framework/APSettingsService.cpp b/lib/framework/APSettingsService.cpp index 4c3c7994d..d4811be01 100644 --- a/lib/framework/APSettingsService.cpp +++ b/lib/framework/APSettingsService.cpp @@ -1,6 +1,6 @@ #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" APSettingsService::APSettingsService(AsyncWebServer * server, FS * fs, SecurityManager * securityManager) : _httpEndpoint(APSettings::read, APSettings::update, this, server, AP_SETTINGS_SERVICE_PATH, securityManager) diff --git a/lib/framework/FactoryResetService.cpp b/lib/framework/FactoryResetService.cpp index 46a6443d8..02045421a 100644 --- a/lib/framework/FactoryResetService.cpp +++ b/lib/framework/FactoryResetService.cpp @@ -18,10 +18,7 @@ void FactoryResetService::handleRequest(AsyncWebServerRequest * request) { * Delete function assumes that all files are stored flat, within the config directory. */ void FactoryResetService::factoryReset() { - /* - * Based on LittleFS. Modified by proddy - * Could be replaced with fs.rmdir(FS_CONFIG_DIRECTORY) in IDF 4.2 - */ + // TODO Could be replaced with fs.rmdir(FS_CONFIG_DIRECTORY) in IDF 4.2 File root = fs->open(FS_CONFIG_DIRECTORY); File file; while (file = root.openNextFile()) { diff --git a/lib/framework/FeaturesService.cpp b/lib/framework/FeaturesService.cpp index 5dceb1a66..f8a82f441 100644 --- a/lib/framework/FeaturesService.cpp +++ b/lib/framework/FeaturesService.cpp @@ -1,7 +1,7 @@ #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" -using namespace std::placeholders; // for `_1` etc +using namespace std::placeholders; // for `_1` etc FeaturesService::FeaturesService(AsyncWebServer * server) { server->on(FEATURES_SERVICE_PATH, HTTP_GET, std::bind(&FeaturesService::features, this, _1)); diff --git a/lib/framework/HttpEndpoint.h b/lib/framework/HttpEndpoint.h index 0e0014049..448d36b46 100644 --- a/lib/framework/HttpEndpoint.h +++ b/lib/framework/HttpEndpoint.h @@ -115,7 +115,7 @@ class HttpPostEndpoint { response->setLength(); if (outcome == StateUpdateResult::CHANGED_RESTART) { - response->setCode(205); // added by proddy, reboot required + response->setCode(205); // reboot required } request->send(response); } diff --git a/lib/framework/MqttSettingsService.cpp b/lib/framework/MqttSettingsService.cpp index aef0d014d..297d49bd8 100644 --- a/lib/framework/MqttSettingsService.cpp +++ b/lib/framework/MqttSettingsService.cpp @@ -1,6 +1,6 @@ #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" using namespace std::placeholders; // for `_1` etc @@ -144,7 +144,6 @@ void MqttSettingsService::onConfigUpdated() { _reconfigureMqtt = true; _disconnectedAt = 0; - // added by proddy startClient(); emsesp::EMSESP::mqtt_.start(); // reload EMS-ESP MQTT settings } @@ -231,7 +230,6 @@ void MqttSettings::read(MqttSettings & settings, JsonObject & root) { root["clean_session"] = settings.cleanSession; root["entity_format"] = settings.entity_format; - // added by proddy for EMS-ESP root["publish_time_boiler"] = settings.publish_time_boiler; root["publish_time_thermostat"] = settings.publish_time_thermostat; root["publish_time_solar"] = settings.publish_time_solar; diff --git a/lib/framework/MqttSettingsService.h b/lib/framework/MqttSettingsService.h index e13b4f4c8..90d1a53c7 100644 --- a/lib/framework/MqttSettingsService.h +++ b/lib/framework/MqttSettingsService.h @@ -76,7 +76,7 @@ class MqttSettings { uint16_t keepAlive; bool cleanSession; - // proddy EMS-ESP specific + // EMS-ESP specific String base; uint16_t publish_time_boiler; uint16_t publish_time_thermostat; diff --git a/lib/framework/MqttStatus.cpp b/lib/framework/MqttStatus.cpp index c5ff2a05c..2a12ac16f 100644 --- a/lib/framework/MqttStatus.cpp +++ b/lib/framework/MqttStatus.cpp @@ -1,6 +1,6 @@ #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" using namespace std::placeholders; // for `_1` etc @@ -20,9 +20,9 @@ void MqttStatus::mqttStatus(AsyncWebServerRequest * request) { root["client_id"] = _mqttSettingsService->getClientId(); root["disconnect_reason"] = (uint8_t)_mqttSettingsService->getDisconnectReason(); - root["mqtt_queued"] = emsesp::Mqtt::publish_queued(); // mdvp added - root["mqtt_fails"] = emsesp::Mqtt::publish_fails(); // proddy added - root["connect_count"] = emsesp::Mqtt::connect_count(); // mdvp added + root["mqtt_queued"] = emsesp::Mqtt::publish_queued(); + root["mqtt_fails"] = emsesp::Mqtt::publish_fails(); + root["connect_count"] = emsesp::Mqtt::connect_count(); response->setLength(); request->send(response); diff --git a/lib/framework/NTPSettingsService.cpp b/lib/framework/NTPSettingsService.cpp index 61ec95020..5d4529d96 100644 --- a/lib/framework/NTPSettingsService.cpp +++ b/lib/framework/NTPSettingsService.cpp @@ -1,7 +1,7 @@ #include #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" using namespace std::placeholders; // for `_1` etc diff --git a/lib/framework/NTPStatus.cpp b/lib/framework/NTPStatus.cpp index 9433d6253..069814dfa 100644 --- a/lib/framework/NTPStatus.cpp +++ b/lib/framework/NTPStatus.cpp @@ -1,5 +1,5 @@ #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" using namespace std::placeholders; // for `_1` etc diff --git a/lib/framework/NetworkSettingsService.cpp b/lib/framework/NetworkSettingsService.cpp index 23428d2f4..da89434b3 100644 --- a/lib/framework/NetworkSettingsService.cpp +++ b/lib/framework/NetworkSettingsService.cpp @@ -69,7 +69,7 @@ void NetworkSettingsService::manageSTA() { esp_wifi_set_bandwidth((wifi_interface_t)ESP_IF_WIFI_STA, WIFI_BW_HT40); } if (networkSettings.nosleep) { - WiFi.setSleep(false); // turn off sleep - WIFI_PS_NONE + WiFi.setSleep(false); // turn off sleep - WIFI_PS_NONE } WiFi.begin(_state.ssid.c_str(), _state.password.c_str()); // attempt to connect to the network esp_wifi_set_max_tx_power(networkSettings.tx_power * 4); // set power after wifi is startet for C3 diff --git a/lib/framework/NetworkStatus.cpp b/lib/framework/NetworkStatus.cpp index 8a999c46e..6aea4580f 100644 --- a/lib/framework/NetworkStatus.cpp +++ b/lib/framework/NetworkStatus.cpp @@ -1,6 +1,6 @@ #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" using namespace std::placeholders; // for `_1` etc diff --git a/lib/framework/OTASettingsService.cpp b/lib/framework/OTASettingsService.cpp index 3fb20eeee..c20f4cadd 100644 --- a/lib/framework/OTASettingsService.cpp +++ b/lib/framework/OTASettingsService.cpp @@ -1,6 +1,6 @@ #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" using namespace std::placeholders; // for `_1` etc diff --git a/lib/framework/SecuritySettingsService.cpp b/lib/framework/SecuritySettingsService.cpp index 87f7fbc95..5427a2fa8 100644 --- a/lib/framework/SecuritySettingsService.cpp +++ b/lib/framework/SecuritySettingsService.cpp @@ -2,7 +2,7 @@ #if FT_ENABLED(FT_SECURITY) -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" SecuritySettingsService::SecuritySettingsService(AsyncWebServer * server, FS * fs) : _httpEndpoint(SecuritySettings::read, SecuritySettings::update, this, server, SECURITY_SETTINGS_PATH, this) diff --git a/lib/framework/StatefulService.h b/lib/framework/StatefulService.h index 01943088d..7ee72e0a0 100644 --- a/lib/framework/StatefulService.h +++ b/lib/framework/StatefulService.h @@ -19,7 +19,7 @@ enum class StateUpdateResult { CHANGED = 0, // The update changed the state and propagation should take place if required - CHANGED_RESTART, // a restart of the device is needed - added by proddy + CHANGED_RESTART, // a restart of the device is needed UNCHANGED, // The state was unchanged, propagation should not take place ERROR // There was a problem updating the state, propagation should not take place }; diff --git a/lib/framework/SystemStatus.cpp b/lib/framework/SystemStatus.cpp index 53bafdb22..10c7a7856 100644 --- a/lib/framework/SystemStatus.cpp +++ b/lib/framework/SystemStatus.cpp @@ -1,7 +1,7 @@ #include #include -#include "../../src/emsesp_stub.hpp" // proddy added +#include "../../src/emsesp_stub.hpp" using namespace std::placeholders; // for `_1` etc @@ -39,7 +39,7 @@ void SystemStatus::systemStatus(AsyncWebServerRequest * request) { const esp_partition_t * partition = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_FACTORY, NULL); if (partition != NULL) { // factory partition found root["has_loader"] = true; - } else { // check for not empty, smaller OTA partition + } else { // check for not empty, smaller OTA partition partition = esp_ota_get_next_update_partition(NULL); if (partition) { uint64_t buffer;