CUST: - FwUpdateSw: - state machine adapted to communication error - unfinished

This commit is contained in:
Thomas Wiedebusch
2024-04-23 19:12:15 +02:00
parent b2c1dfb96e
commit 73f342f3cf
7 changed files with 65 additions and 45 deletions
@@ -1414,7 +1414,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
private void ReadMeterFirmwareAndAssignRegisters()
{
// Avoid overwriting of list if this already exits
if (MeterAppListVersion.Any())
if (MeterAppListVersion.Any() && MeterAppListVersion.All(f => f.Status != MeterAppState.Unknown))
{
_logger.Warn($"Slot:{Slot} - Trying to override meter dictionary. Skip read out FW");
return;
@@ -1422,6 +1422,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
// On new readout reset the installed version
InstalledFwVersion = 0;
MeterAppListVersion.Clear();
//Get all existing applications from meter register dictionary
foreach (var meterApp in _configApplications.OrderBy(o => o.AppId))
@@ -1 +1 @@
89102b0142e574de38a9f47d370f3334e5e6c268
8fbe991b217e7692af4817ad205b768685aa5a72