parent
ebff2049af
commit
1e14d2db2a
1 changed files with 4 additions and 4 deletions
|
|
@ -50,7 +50,7 @@ const (
|
|||
timerInactive = "inactive"
|
||||
|
||||
minActiveCurrent = 1.0 // minimum current at which a phase is treated as active
|
||||
minActiveVoltage = 208 // minimum voltage at which a phase is treated as active
|
||||
minActiveVoltage = 207 // minimum voltage at which a phase is treated as active
|
||||
|
||||
guardGracePeriod = 60 * time.Second // allow out of sync during this timespan
|
||||
phaseSwitchCommandTimeout = 30 * time.Second // do not sync charger enabled/disabled state during this timespan
|
||||
|
|
@ -1261,15 +1261,15 @@ func (lp *Loadpoint) updateChargeVoltages() {
|
|||
lp.publish("chargeVoltages", chargeVoltages)
|
||||
|
||||
// Quine-McCluskey for (¬L1∧L2∧¬L3) ∨ (L1∧L2∧¬L3) ∨ (¬L1∧¬L2∧L3) ∨ (L1∧¬L2∧L3) ∨ (¬L1∧L2∧L3) -> ¬L1 ∧ L3 ∨ L2 ∧ ¬L3 ∨ ¬L2 ∧ L3
|
||||
if !(u1 > minActiveVoltage) && (u3 > minActiveVoltage) || (u2 > minActiveVoltage) && !(u3 > minActiveVoltage) || !(u2 > minActiveVoltage) && (u3 > minActiveVoltage) {
|
||||
if !(u1 >= minActiveVoltage) && (u3 >= minActiveVoltage) || (u2 >= minActiveVoltage) && !(u3 >= minActiveVoltage) || !(u2 >= minActiveVoltage) && (u3 >= minActiveVoltage) {
|
||||
lp.log.WARN.Printf("invalid phase wiring between charge meter and charger")
|
||||
}
|
||||
|
||||
var phases int
|
||||
if (u1 > minActiveVoltage) || (u2 > minActiveVoltage) || (u3 > minActiveVoltage) {
|
||||
if (u1 >= minActiveVoltage) || (u2 >= minActiveVoltage) || (u3 >= minActiveVoltage) {
|
||||
phases = 3
|
||||
}
|
||||
if (u1 > minActiveVoltage) && (u2 < minActiveVoltage) && (u3 < minActiveVoltage) {
|
||||
if (u1 >= minActiveVoltage) && (u2 < minActiveVoltage) && (u3 < minActiveVoltage) {
|
||||
phases = 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue