Skip to content

Commit

Permalink
add console message when limit is scaled but the current limit was kept
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBoehm committed May 14, 2024
1 parent 70bf8c5 commit ce42c48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/PowerLimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,12 @@ int32_t PowerLimiterClass::scalePowerLimit(std::shared_ptr<InverterAbstract> inv

// keep the currentLimit when all channels are shaded and we get the
// expected AC power or less.
if (dcShadedChnls == dcTotalChnls && inverterOutputAC <= newLimit) { return currentLimitWatts; }
if (dcShadedChnls == dcTotalChnls && inverterOutputAC <= newLimit) {
MessageOutput.printf("[DPL::scalePowerLimit] all channels are producing less than expected, "
"keeping the current limit of %d W instead of %d W by \r\n", currentLimitWatts, newLimit);

return currentLimitWatts;
}

size_t dcNonShadedChnls = dcTotalChnls - dcShadedChnls;
auto overScaled = static_cast<int32_t>((newLimit - shadedChannelACPowerSum) / dcNonShadedChnls * dcTotalChnls);
Expand Down

0 comments on commit ce42c48

Please sign in to comment.