From: Jérôme Benoit Date: Sun, 12 Nov 2023 21:12:07 +0000 (+0100) Subject: fix: ensure voltage is defined in stationInfo X-Git-Tag: v1.2.24~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=499c5f482f7bae009522cc4579ed7baf3fb717b0;p=e-mobility-charging-stations-simulator.git fix: ensure voltage is defined in stationInfo Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 8cdde246..94b6d8bd 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1115,6 +1115,7 @@ export class ChargingStation extends EventEmitter { stationInfo.chargingStationId = getChargingStationId(this.index, stationTemplate); stationInfo.ocppVersion = stationTemplate?.ocppVersion ?? OCPPVersion.VERSION_16; createSerialNumber(stationTemplate, stationInfo); + stationInfo.voltageOut = this.getVoltageOut(stationInfo); if (isNotEmptyArray(stationTemplate?.power)) { stationTemplate.power = stationTemplate.power as number[]; const powerArrayRandomIndex = Math.floor(secureRandom() * stationTemplate.power.length);