Skip to content

Commit

Permalink
fix problem without switching phase option set
Browse files Browse the repository at this point in the history
paresy authored Dec 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 215ad81 commit acda2fa
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions E-Car/module.php
Original file line number Diff line number Diff line change
@@ -255,15 +255,25 @@ public function Update()
break;
case 2:
if (!$this->ReadPropertyBoolean('SplitPhases')) {
$value = $this->GetValue('CurrentL12') * $volt * $this->GetValue('Phases');
if ($this->ReadPropertyBoolean('Switching')) {
$value = $this->GetValue('CurrentL12') * $volt * $this->GetValue('Phases');
}
else {
$value = $this->GetValue('CurrentL123') * $volt * 2;
}
} elseif ($this->ReadPropertyBoolean('SplitPhases')) {
$value += $this->GetValue('CurrentL1') * $volt;
$value += $this->GetValue('CurrentL2') * $volt;
}
break;
case 3:
if (!$this->ReadPropertyBoolean('SplitPhases')) {
$value = $this->GetValue('CurrentL123') * $volt * $this->GetValue('Phases');
if ($this->ReadPropertyBoolean('Switching')) {
$value = $this->GetValue('CurrentL123') * $volt * $this->GetValue('Phases');
}
else {
$value = $this->GetValue('CurrentL123') * $volt * 3;
}
} elseif ($this->ReadPropertyBoolean('SplitPhases')) {
$value += $this->GetValue('CurrentL1') * $volt;
$value += $this->GetValue('CurrentL2') * $volt;

0 comments on commit acda2fa

Please sign in to comment.