From 5dcb9d4945027c6be39e4342f1627ea2da3813b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 19 Mar 2024 20:15:06 +0100 Subject: [PATCH] refactor: move template firmware defaults to constants MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.ts | 9 --------- src/utils/Constants.ts | 6 ++++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 92b5fe75..e41ea5ec 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1191,15 +1191,6 @@ export class ChargingStation extends EventEmitter { } does not match firmware version pattern '${stationInfo.firmwareVersionPattern}'` ) } - stationInfo.firmwareUpgrade = mergeDeepRight( - { - versionUpgrade: { - step: 1 - }, - reset: true - }, - stationTemplate.firmwareUpgrade ?? {} - ) if (stationTemplate.resetTime != null) { stationInfo.resetTime = secondsToMilliseconds(stationTemplate.resetTime) } diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index a5e46f60..3746c4fd 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -34,6 +34,12 @@ export class Constants { useConnectorId0: true, ocppVersion: OCPPVersion.VERSION_16, firmwareVersionPattern: Constants.SEMVER_PATTERN, + firmwareUpgrade: { + versionUpgrade: { + step: 1 + }, + reset: true + }, ocppPersistentConfiguration: true, stationInfoPersistentConfiguration: true, automaticTransactionGeneratorPersistentConfiguration: true, -- 2.34.1