From f6d0b0997fc82e074cb5cc1ab7651f37dd23b88a Mon Sep 17 00:00:00 2001 From: MalteSchm Date: Sun, 9 Apr 2023 21:55:45 +0200 Subject: [PATCH 1/2] typo --- include/Configuration.h | 2 +- src/Configuration.cpp | 4 ++-- src/WebApi_powerlimiter.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/Configuration.h b/include/Configuration.h index 2894b3e0..6c62598e 100644 --- a/include/Configuration.h +++ b/include/Configuration.h @@ -128,7 +128,7 @@ struct CONFIG_T { POWERMETER_HTTP_PHASE_CONFIG_T Powermeter_Http_Phase[POWERMETER_MAX_PHASES]; bool PowerLimiter_Enabled; - bool PowerLimiter_SolarPassTroughEnabled; + bool PowerLimiter_SolarPassThroughEnabled; uint8_t PowerLimiter_BatteryDrainStategy; uint32_t PowerLimiter_Interval; bool PowerLimiter_IsInverterBehindPowerMeter; diff --git a/src/Configuration.cpp b/src/Configuration.cpp index 7b6be171..e18ae12a 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -140,7 +140,7 @@ bool ConfigurationClass::write() JsonObject powerlimiter = doc.createNestedObject("powerlimiter"); powerlimiter["enabled"] = config.PowerLimiter_Enabled; - powerlimiter["solar_passtrough_enabled"] = config.PowerLimiter_SolarPassTroughEnabled; + powerlimiter["solar_passtrough_enabled"] = config.PowerLimiter_SolarPassThroughEnabled; powerlimiter["battery_drain_strategy"] = config.PowerLimiter_BatteryDrainStategy; powerlimiter["interval"] = config.PowerLimiter_Interval; powerlimiter["is_inverter_behind_powermeter"] = config.PowerLimiter_IsInverterBehindPowerMeter; @@ -329,7 +329,7 @@ bool ConfigurationClass::read() JsonObject powerlimiter = doc["powerlimiter"]; config.PowerLimiter_Enabled = powerlimiter["enabled"] | POWERLIMITER_ENABLED; - config.PowerLimiter_SolarPassTroughEnabled = powerlimiter["solar_passtrough_enabled"] | POWERLIMITER_SOLAR_PASSTROUGH_ENABLED; + config.PowerLimiter_SolarPassThroughEnabled = powerlimiter["solar_passtrough_enabled"] | POWERLIMITER_SOLAR_PASSTROUGH_ENABLED; config.PowerLimiter_BatteryDrainStategy = powerlimiter["battery_drain_strategy"] | POWERLIMITER_BATTERY_DRAIN_STRATEGY; config.PowerLimiter_Interval = POWERLIMITER_INTERVAL; config.PowerLimiter_IsInverterBehindPowerMeter = powerlimiter["is_inverter_behind_powermeter"] | POWERLIMITER_IS_INVERTER_BEHIND_POWER_METER; diff --git a/src/WebApi_powerlimiter.cpp b/src/WebApi_powerlimiter.cpp index c1015240..56fb0cf6 100644 --- a/src/WebApi_powerlimiter.cpp +++ b/src/WebApi_powerlimiter.cpp @@ -38,7 +38,7 @@ void WebApiPowerLimiterClass::onStatus(AsyncWebServerRequest* request) const CONFIG_T& config = Configuration.get(); root[F("enabled")] = config.PowerLimiter_Enabled; - root[F("solar_passtrough_enabled")] = config.PowerLimiter_SolarPassTroughEnabled; + root[F("solar_passtrough_enabled")] = config.PowerLimiter_SolarPassThroughEnabled; root[F("battery_drain_strategy")] = config.PowerLimiter_BatteryDrainStategy; root[F("is_inverter_behind_powermeter")] = config.PowerLimiter_IsInverterBehindPowerMeter; root[F("inverter_id")] = config.PowerLimiter_InverterId; @@ -119,7 +119,7 @@ void WebApiPowerLimiterClass::onAdminPost(AsyncWebServerRequest* request) CONFIG_T& config = Configuration.get(); config.PowerLimiter_Enabled = root[F("enabled")].as(); - config.PowerLimiter_SolarPassTroughEnabled = root[F("solar_passtrough_enabled")].as(); + config.PowerLimiter_SolarPassThroughEnabled = root[F("solar_passtrough_enabled")].as(); config.PowerLimiter_BatteryDrainStategy= root[F("battery_drain_strategy")].as(); config.PowerLimiter_IsInverterBehindPowerMeter = root[F("is_inverter_behind_powermeter")].as(); config.PowerLimiter_InverterId = root[F("inverter_id")].as(); From 2d7115e1e86b0ef60f623df8941df15a944aee68 Mon Sep 17 00:00:00 2001 From: MalteSchm Date: Sun, 9 Apr 2023 22:06:47 +0200 Subject: [PATCH 2/2] typo --- src/PowerLimiter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PowerLimiter.cpp b/src/PowerLimiter.cpp index 6cde83dd..af5ef294 100644 --- a/src/PowerLimiter.cpp +++ b/src/PowerLimiter.cpp @@ -154,7 +154,7 @@ bool PowerLimiterClass::canUseDirectSolarPower() { CONFIG_T& config = Configuration.get(); - if (!config.PowerLimiter_SolarPassTroughEnabled + if (!config.PowerLimiter_SolarPassThroughEnabled || !config.Vedirect_Enabled) { return false; }