fixing a bug introduced in merge
This commit is contained in:
parent
734d34b7a8
commit
869d8e6d8b
@ -174,8 +174,8 @@ int32_t PowerLimiterClass::calcPowerLimit(std::shared_ptr<InverterAbstract> inve
|
|||||||
int32_t newPowerLimit = round(PowerMeter.getPowerTotal());
|
int32_t newPowerLimit = round(PowerMeter.getPowerTotal());
|
||||||
|
|
||||||
// Safety check, return on too old power meter values
|
// Safety check, return on too old power meter values
|
||||||
if (millis() - PowerMeter.getLastPowerMeterUpdate() < (30 * 1000)
|
if (millis() - PowerMeter.getLastPowerMeterUpdate() > (30 * 1000)
|
||||||
&& millis() - inverter->Statistics()->getLastUpdate() < (config.Dtu_PollInterval * 3 * 1000)) {
|
&& (millis() - inverter->Statistics()->getLastUpdate()) > (config.Dtu_PollInterval * 3 * 1000)) {
|
||||||
// If the power meter values are older than 30 seconds,
|
// If the power meter values are older than 30 seconds,
|
||||||
// and the Inverter Stats are older then 3x the poll interval
|
// and the Inverter Stats are older then 3x the poll interval
|
||||||
// set the limit to config.PowerLimiter_LowerPowerLimit for safety reasons.
|
// set the limit to config.PowerLimiter_LowerPowerLimit for safety reasons.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user