diff --git a/ServiceFwUpdate/Ui/ServiceFwUpdateSw/FrmServiceFwUpdateSw.cs b/ServiceFwUpdate/Ui/ServiceFwUpdateSw/FrmServiceFwUpdateSw.cs
index be49218d..2b024bcc 100644
--- a/ServiceFwUpdate/Ui/ServiceFwUpdateSw/FrmServiceFwUpdateSw.cs
+++ b/ServiceFwUpdate/Ui/ServiceFwUpdateSw/FrmServiceFwUpdateSw.cs
@@ -4654,41 +4654,35 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
///
/// - Use installed FW version to decide if LUT is required.
///
+ ///
+ /// - Uses LUT CRC and file list for installation requirement.
+ ///
private void RestoreLutFile(ProcessState successExitState, ProcessState errorExitState = ProcessState.Error)
{
// Remind the invoker being able to generate error messages based on the last state
_invokerProcessState = _processState;
InfoProcessActive(lblLutFileCheck, Resources.StrLutFileRestoreActive, false);
- //1. If InstalledFwVersion is below 1.2.xxx a LUT file is NOT required
- if ((_currentGenesis.Region == "EMEA"
- && _currentGenesis.InstalledFwVersion < MeterLutUpdate.EmeaFwThresholdForLutFile) ||
- (_currentGenesis.Region == "NA"
- && _currentGenesis.InstalledFwVersion < MeterLutUpdate.NaFwThresholdForLutFile))
- {
- InfoProcessSuccess(lblLutFileCheck, Resources.StrLutFileNotNeeded);
- _processState = successExitState;
- return;
- }
-
- // 2. LUT file is needed but invalid indicated by CRC or cannot be observed in file list
+ // 1. LUT file is needed but invalid indicated by CRC or cannot be observed in file list
if ( (!string.IsNullOrEmpty(_currentGenesis.LutCrc)
&& _currentGenesis.LutCrc.Contains(MeterLutFile.StrLutFileInvalidCrc))
- || (_readMeterFiles != null
- && !_readMeterFiles.Any(f => f.Contains(MeterLutFile.StrLutMeterFileName))))
+ || (_readMeterFiles != null && !_readMeterFiles.Any(f => f.Contains(MeterLutFile.StrLutMeterFileName))))
{
InfoProcessFailed(lblLutFileCheck, Resources.StrLutFileNotInstalled);
_processState = errorExitState;
return;
}
- // 3. LUT file NOT installed:
+
+ // 2. LUT file NOT installed:
// If meter LUT CRC is not set and the meter files do not report the LUT, the meter does not have an
// installed LUT
if ((string.IsNullOrEmpty(_currentGenesis.LutCrc) ||
- _currentGenesis.LutCrc.Equals(Constants.StrUnknown)) &&
- _readMeterFiles != null && !_readMeterFiles.Any(f => f.Contains(MeterLutFile.StrLutMeterFileName)))
+ _currentGenesis.LutCrc.Equals(Constants.StrUnknown))
+ && _readMeterFiles != null
+ && !_readMeterFiles.Any(f => f.Contains(MeterLutFile.StrLutMeterFileName))
+ && !_readMeterFiles.Any(f => f.Contains(MeterLutFile.StrLutBackupMeterFileName)))
{
- // 3. a) LUT file not installed but required by the FW update safe:
+ // 2. a) LUT file not installed but required by the FW update safe:
// If the safe contains a LUT file, the installation of it has failed or it got lost during
// update
if (_fwUpdateSafeLutFile != null)
@@ -4698,7 +4692,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
return;
}
- // 3. b) LUT file not installed and not delivered by the FW update safe
+ // 2. b) LUT file not installed and not delivered by the FW update safe
// This FW version does not require a LUT file
InfoProcessSuccess(lblLutFileCheck, Resources.StrLutFileNotNeeded);
_processState = successExitState;
@@ -4706,11 +4700,11 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
return;
}
- // 4. LUT file is installed:
- // 4.a) Lut file is installed but NOT in the safe:
+ // 3. LUT file is installed:
+ // 3.a) Lut file is installed but NOT in the safe:
// If the LUT is not in the safe it cannot be restored or compared to the required content but can
// be analyzed and logged
- // 4.b) LUT file is installed and delivered by the FW update safe:
+ // 3.b) LUT file is installed and delivered by the FW update safe:
// On validated installed LUT file in meter this can be compared with the required LUT file
if (!ReadLogAndCompareMeterLutFile())
{