X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStation.ts;h=5b5ac56e4d79e8ced4d3e15758f7b554f331550e;hb=9c7195b209ec5072ba96581f7c2a30314c59fb76;hp=dc95782d7aa78462e6bbe453fa39e33d08f97b84;hpb=f4bf2abdd27ce5ddb64d0efd3763608320efc8d8;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index dc95782d..5b5ac56e 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -525,7 +525,7 @@ export default class ChargingStation { // Generate all connectors if ((this.stationInfo.Connectors[0] ? templateMaxConnectors - 1 : templateMaxConnectors) > 0) { for (let index = 1; index <= maxConnectors; index++) { - const randConnectorId = this.stationInfo.randomConnectors ? Utils.getRandomInt(Utils.convertToInt(lastConnector), 1) : index; + const randConnectorId = this.stationInfo.randomConnectors ? Utils.getRandomInteger(Utils.convertToInt(lastConnector), 1) : index; this.connectors[index] = Utils.cloneObject(this.stationInfo.Connectors[randConnectorId]); this.connectors[index].availability = AvailabilityType.OPERATIVE; if (Utils.isUndefined(this.connectors[lastConnector]?.chargingProfiles)) { @@ -1003,7 +1003,7 @@ export default class ChargingStation { private startStationTemplateFileMonitoring(): void { try { - fs.watch(this.stationTemplateFile, async (event, filename): Promise => { + fs.watch(this.stationTemplateFile, (event, filename): void => { if (filename && event === 'change') { try { logger.debug(this.logPrefix() + ' Template file ' + this.stationTemplateFile + ' have changed, reload');