From: Jérôme Benoit Date: Thu, 2 Feb 2023 23:53:18 +0000 (+0100) Subject: fix(simulator): fix default version bump scale at firmware upgrade X-Git-Tag: v1.1.93~16 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=598c886d552bbefae7d2c539da6f104c243e3c7f;p=e-mobility-charging-stations-simulator.git fix(simulator): fix default version bump scale at firmware upgrade simulation Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 79cf45b8..54b3afab 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -36,6 +36,7 @@ import type { ChargingStationOcppConfiguration } from '../types/ChargingStationO import { type ChargingStationTemplate, CurrentType, + type FirmwareUpgrade, PowerUnits, type WsOptions, } from '../types/ChargingStationTemplate'; @@ -890,8 +891,11 @@ export default class ChargingStation { } does not match firmware version pattern '${stationInfo.firmwareVersionPattern}'` ); } - stationInfo.firmwareUpgrade = merge( + stationInfo.firmwareUpgrade = merge( { + versionUpgrade: { + step: 1, + }, reset: true, }, stationTemplate?.firmwareUpgrade ?? {} diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index 209ce774..2cba674d 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -69,7 +69,10 @@ export default class Configuration { }, }; if (Configuration.objectHasOwnProperty(Configuration.getConfig(), 'uiServer')) { - uiServerConfiguration = merge(uiServerConfiguration, Configuration.getConfig()?.uiServer); + uiServerConfiguration = merge( + uiServerConfiguration, + Configuration.getConfig()?.uiServer + ); } if (Configuration.isCFEnvironment() === true) { delete uiServerConfiguration.options?.host;