Skip to content

Commit

Permalink
V1.18.18
Browse files Browse the repository at this point in the history
  • Loading branch information
jgyates committed Oct 2, 2023
1 parent 2494c64 commit a1bcec5
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions genmonlib/generac_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -3882,7 +3882,7 @@ def CheckExternalCTData(self, request="current", ReturnFloat=False, gauge=False)
return DefaultReturn

# ------------ Evolution:GetCurrentOutput -----------------------------------
def GetCurrentOutput(self, ReturnFloat=False):
def GetCurrentOutput(self, ReturnFloat=False, force_sensor = False):

CurrentOutput = 0.0
Divisor = 1.0
Expand All @@ -3903,9 +3903,10 @@ def GetCurrentOutput(self, ReturnFloat=False):
if "Stopped" in EngineState or "Off" in EngineState or not len(EngineState):
return DefaultReturn

ReturnValue = self.CheckExternalCTData(request="current", ReturnFloat=ReturnFloat)
if ReturnValue != None:
return ReturnValue
if not force_sensor:
ReturnValue = self.CheckExternalCTData(request="current", ReturnFloat=ReturnFloat)
if ReturnValue != None:
return ReturnValue

if self.EvolutionController and self.LiquidCooled:
Value = self.GetRegisterValueFromList("0058") # Hall Effect Sensor
Expand Down Expand Up @@ -4767,20 +4768,13 @@ def DisplayStatus(self, DictOut=False, JSONNum=False, Reg0001Value=None):
)

if self.PowerMeterIsSupported():
Engine.append(
{
"Output Current": self.ValueOut(
self.GetCurrentOutput(ReturnFloat=True), "A", JSONNum
)
}
)
Engine.append(
{
"Output Power (Single Phase)": self.ValueOut(
self.GetPowerOutput(ReturnFloat=True), "kW", JSONNum
)
}
)
Engine.append({"Output Current": self.ValueOut(self.GetCurrentOutput(ReturnFloat=True), "A", JSONNum)})

if self.UseExternalCTData and self.LiquidCooled and self.EvolutionController:
# show the internal Hall sensor if external CTs are used. If no external CTs are present, then this is shown with "Output Current"
Engine.append({"Hall Effect Sensor": self.ValueOut(self.GetCurrentOutput(ReturnFloat=True, force_sensor=True), "A", JSONNum)})

Engine.append({"Output Power (Single Phase)": self.ValueOut(self.GetPowerOutput(ReturnFloat=True), "kW", JSONNum)})

Engine.append(
{
Expand Down

0 comments on commit a1bcec5

Please sign in to comment.