From: Jérôme Benoit Date: Tue, 19 Mar 2024 19:15:06 +0000 (+0100) Subject: refactor: move template firmware defaults to constants X-Git-Tag: v1.3.1~28 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5dcb9d4945027c6be39e4342f1627ea2da3813b7;p=e-mobility-charging-stations-simulator.git refactor: move template firmware defaults to constants Signed-off-by: Jérôme Benoit --- 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,