From: Jérôme Benoit Date: Fri, 10 Nov 2023 22:33:29 +0000 (+0100) Subject: fix: fix connector 0 handling in ConnectorPhaseRotation OCPP X-Git-Tag: v1.2.24~17 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d181b12b516b58fc80cbd5300570612e6b025024;p=e-mobility-charging-stations-simulator.git fix: fix connector 0 handling in ConnectorPhaseRotation OCPP configuration Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Helpers.ts b/src/charging-station/Helpers.ts index e66043e9..f0f848d3 100644 --- a/src/charging-station/Helpers.ts +++ b/src/charging-station/Helpers.ts @@ -175,9 +175,9 @@ export const getPhaseRotationValue = ( } else if (connectorId > 0 && numberOfPhases === 0) { return `${connectorId}.${ConnectorPhaseRotation.NotApplicable}`; // AC - } else if (connectorId > 0 && numberOfPhases === 1) { + } else if (connectorId >= 0 && numberOfPhases === 1) { return `${connectorId}.${ConnectorPhaseRotation.NotApplicable}`; - } else if (connectorId > 0 && numberOfPhases === 3) { + } else if (connectorId >= 0 && numberOfPhases === 3) { return `${connectorId}.${ConnectorPhaseRotation.RST}`; } };