From: Jérôme Benoit Date: Wed, 31 Aug 2022 00:29:22 +0000 (+0200) Subject: Fix two ATG semantic consistencies X-Git-Tag: v1.1.69~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ecb3869d21232120be79a873a9c81a1dbc902a9b;p=e-mobility-charging-stations-simulator.git Fix two ATG semantic consistencies Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/AutomaticTransactionGenerator.ts b/src/charging-station/AutomaticTransactionGenerator.ts index 6145ac10..bf28e55b 100644 --- a/src/charging-station/AutomaticTransactionGenerator.ts +++ b/src/charging-station/AutomaticTransactionGenerator.ts @@ -80,7 +80,7 @@ export default class AutomaticTransactionGenerator { } public startConnector(connectorId: number): void { - if (this.connectorsStatus.has(connectorId) === false) { + if (this.chargingStation.connectors.has(connectorId) === false) { logger.warn(`${this.logPrefix(connectorId)} trying to start on non existing connector`); return; } @@ -91,7 +91,7 @@ export default class AutomaticTransactionGenerator { /* This is intentional */ }); }); - } else { + } else if (this.connectorsStatus.get(connectorId)?.start === true) { logger.warn(`${this.logPrefix(connectorId)} already started on connector`); } }