From bb3343f93c9a7ce03bfe9346c846ea2c3c4ee343 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 15 May 2021 18:32:32 +0200 Subject: [PATCH] Make a constants name consistent. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/1.6/OCPP16RequestService.ts | 4 ++-- src/utils/Constants.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts index fe9d27f0..8e5c3ffa 100644 --- a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts @@ -62,7 +62,7 @@ export default class OCPP16RequestService extends OCPPRequestService { public async sendAuthorize(idTag?: string): Promise { try { const payload: AuthorizeRequest = { - ...!Utils.isUndefined(idTag) ? { idTag } : { idTag: Constants.TRANSACTION_DEFAULT_TAGID }, + ...!Utils.isUndefined(idTag) ? { idTag } : { idTag: Constants.TRANSACTION_DEFAULT_IDTAG }, }; return await this.sendMessage(Utils.generateUUID(), payload, MessageType.CALL_MESSAGE, OCPP16RequestCommand.AUTHORIZE) as OCPP16AuthorizeResponse; } catch (error) { @@ -74,7 +74,7 @@ export default class OCPP16RequestService extends OCPPRequestService { try { const payload: StartTransactionRequest = { connectorId, - ...!Utils.isUndefined(idTag) ? { idTag } : { idTag: Constants.TRANSACTION_DEFAULT_TAGID }, + ...!Utils.isUndefined(idTag) ? { idTag } : { idTag: Constants.TRANSACTION_DEFAULT_IDTAG }, meterStart: 0, timestamp: new Date().toISOString(), }; diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index 6a1a7cfe..8b1df1ca 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -29,7 +29,7 @@ export default class Constants { static readonly CHARGING_STATION_ATG_WAIT_TIME = 2000; // Ms static readonly CHARGING_STATION_ATG_INITIALIZATION_TIME = 1000; // Ms - static readonly TRANSACTION_DEFAULT_TAGID = '00000000'; + static readonly TRANSACTION_DEFAULT_IDTAG = '00000000'; static readonly WORKER_START_DELAY = 500; static readonly WORKER_POOL_MAX_INACTIVE_TIME = 60000; -- 2.34.1