From 4dc879e08270d41814f1fe15b3e8d7e05e8f4932 Mon Sep 17 00:00:00 2001 From: "Reinhard Weber (Brandstaedter)" Date: Thu, 18 Apr 2024 16:12:43 +0200 Subject: [PATCH] typo fix (#223) typo, broke last build --- src/solarflow/dtus.py | 4 ++-- src/solarflow/solarflow-control.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/solarflow/dtus.py b/src/solarflow/dtus.py index 4808df7..248a740 100644 --- a/src/solarflow/dtus.py +++ b/src/solarflow/dtus.py @@ -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 @@ -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) diff --git a/src/solarflow/solarflow-control.py b/src/solarflow/solarflow-control.py index 0ca8acf..4f95447 100644 --- a/src/solarflow/solarflow-control.py +++ b/src/solarflow/solarflow-control.py @@ -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()))