Skip to content

Commit

Permalink
typo fix (#223)
Browse files Browse the repository at this point in the history
typo, broke last build
  • Loading branch information
reinhard-brandstaedter authored Apr 18, 2024
1 parent 9452879 commit 4dc879e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/solarflow/dtus.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def getDirectDCPower(self) -> float:
return sum(self.getDirectDCPowerValues())

def getDirectACPower(self) -> float:
return self.getDirectDCPower * (self.getEfficiency()/100)
return self.getDirectDCPower() * (self.getEfficiency()/100)

def getNrTotalChannels(self) -> int:
return len(self.channelsDCPower)-1
Expand All @@ -176,7 +176,7 @@ def getHubDCPower(self) -> float:
return sum(self.getHubDCPowerValues())

def getHubACPower(self) -> float:
return self.getHubDCPower * (self.getEfficiency()/100)
return self.getHubDCPower() * (self.getEfficiency()/100)

def getNrHubChannels(self) -> int:
return len(self.sf_inverter_channels)
Expand Down
2 changes: 1 addition & 1 deletion src/solarflow/solarflow-control.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def getDirectPanelLimit(inv, hub, smt) -> int:
direct_panel_power = inv.getDirectACPower() + inv.getHubACPower() if hub.getBypass() else 0
if direct_panel_power < MAX_INVERTER_LIMIT:
dc_values = inv.getDirectDCPowerValues() + inv.getHubDCPowerValues() if hub.getBypass() else inv.getDirectDCPowerValues()
return math.ceil(max(dc_values) * (inv.getEfficiency()/100)) if smt.getPower() < 0 else limitedRise(max(dc_values) * (inv.getEfficiency()/100))
return math.ceil(max(dc_values) * (inv.getEfficiency()/100)) if smt.getPower()- smt.zero_offset < 0 else limitedRise(max(dc_values) * (inv.getEfficiency()/100))
else:
return int(MAX_INVERTER_LIMIT*(inv.getNrHubChannels()/inv.getNrTotalChannels()))

Expand Down

0 comments on commit 4dc879e

Please sign in to comment.