+ if (
+ this.stationInfo.firmwareStatus === FirmwareStatus.Installing &&
+ this.stationInfo.firmwareVersion &&
+ this.stationInfo.firmwareVersionPattern
+ ) {
+ const versionStep = this.getFirmwareUpgrade()?.versionUpgrade?.step ?? 1;
+ const patternGroup: number =
+ this.getFirmwareUpgrade()?.versionUpgrade?.patternGroup ??
+ this.stationInfo.firmwareVersion.split('.').length;
+ const match = this.stationInfo.firmwareVersion
+ .match(new RegExp(this.stationInfo.firmwareVersionPattern))
+ .slice(1, patternGroup + 1);
+ const patchLevelIndex = match.length - 1;
+ match[patchLevelIndex] = (
+ Utils.convertToInt(match[patchLevelIndex]) + versionStep
+ ).toString();
+ this.stationInfo.firmwareVersion = match.join('.');
+ }