From: Jérôme Benoit Date: Fri, 18 Mar 2022 15:17:11 +0000 (+0100) Subject: Fix maximun charging station amperage calculation X-Git-Tag: v1.1.57~38 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3581a3a2ccf3e50bfdaac0d4774ddeeaabc586dd;p=e-mobility-charging-stations-simulator.git Fix maximun charging station amperage calculation Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 5f5de2dc..55b58794 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1591,8 +1591,8 @@ export default class ChargingStation { case CurrentType.AC: return ACElectricUtils.amperagePerPhaseFromPower( this.getNumberOfPhases(), - (this.stationInfo['maxPower'] as number) ?? - this.stationInfo.maximumPower / this.getNumberOfConnectors(), + ((this.stationInfo['maxPower'] as number) ?? this.stationInfo.maximumPower) / + this.getNumberOfConnectors(), this.getVoltageOut() ); case CurrentType.DC: