Skip to content

Commit

Permalink
Simplify calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
longzheng committed Dec 13, 2024
1 parent 20a27e8 commit fd82308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coordinator/helpers/inverterController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ export function calculateTargetSolarWatts({
siteWatts: number;
exportLimitWatts: number;
}) {
const changeToMeetExportLimit = new Decimal(-siteWatts).plus(
-exportLimitWatts,
const changeToMeetExportLimit = new Decimal(-siteWatts).sub(
exportLimitWatts,
);
const solarTarget = new Decimal(solarWatts).sub(changeToMeetExportLimit);

Expand Down

0 comments on commit fd82308

Please sign in to comment.