Skip to content

Commit

Permalink
Bugfix loadManager, cfgTotalCurrMax (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
steff393 committed Sep 14, 2024
1 parent 5b6b69e commit 567a91d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/loadManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ static void lm_updateWbLimits() {
break;
}
case 1: { // charging request only on box 0
currLim[0] = saturate2(lastReq[0], content[0][15], cfgTotalCurrMax);
currLim[0] = saturate2(lastReq[0], content[0][15] * 10, cfgTotalCurrMax);
currLim[1] = 0;
break;
}
case 2: { // charging request only on box 1
currLim[0] = 0;
currLim[1] = saturate2(lastReq[1], content[1][15], cfgTotalCurrMax);
currLim[1] = saturate2(lastReq[1], content[1][15] * 10, cfgTotalCurrMax);
break;
}
case 3: { // charging request on both boxes
currLim[0] = saturate2(lastReq[0], content[0][15], cfgTotalCurrMax / 2);
currLim[1] = saturate2(lastReq[1], content[1][15], cfgTotalCurrMax / 2);
currLim[0] = saturate2(lastReq[0], content[0][15] * 10, cfgTotalCurrMax / 2);
currLim[1] = saturate2(lastReq[1], content[1][15] * 10, cfgTotalCurrMax / 2);
break;
}
default: { ; } // shouldn't happen
Expand Down

0 comments on commit 567a91d

Please sign in to comment.