Skip to content

Commit

Permalink
off when newPowerLimit < lowerLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
helgeerbe committed Mar 18, 2023
1 parent 06370ba commit b9acbe6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/PowerLimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,17 @@ void PowerLimiterClass::loop()
int32_t newPowerLimit = calcPowerLimit(inverter, true);
if (!inverter->isProducing()
|| isStopThresholdReached(inverter)
|| (newPowerLimit < config.PowerLimiter_LowerPowerLimit && config.PowerLimiter_BatteryDrainStategy == EMPTY_WHEN_FULL)) {
|| newPowerLimit < config.PowerLimiter_LowerPowerLimit) {
_plState = STATE_OFF;
break;
}
else if (!canUseDirectSolarPower() || isStartThresholdReached(inverter)) {
} else if ((!canUseDirectSolarPower() && config.PowerLimiter_BatteryDrainStategy == EMPTY_AT_NIGTH) || isStartThresholdReached(inverter)) {
_plState = STATE_NORMAL_OPERATION;
break;
}
else if (!canUseDirectSolarPower()) {
_plState = STATE_OFF;
break;
}
setNewPowerLimit(inverter, newPowerLimit);
return;
break;
Expand Down

0 comments on commit b9acbe6

Please sign in to comment.