CUST: - repaired file version calculation
This commit is contained in:
@@ -1432,7 +1432,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// </remarks>
|
||||
public static UInt32 GetFileAppVersion(Byte[] binData)
|
||||
{
|
||||
return (UInt32)(binData[FileAppVersionIndex] + (binData[FileAppVersionIndex + 1] << 8));
|
||||
return (UInt32)((binData[FileAppVersionIndex] & 0x0F)
|
||||
+ ((binData[FileAppVersionIndex] & 0xF0) >> 4) * 10
|
||||
+ (binData[FileAppVersionIndex + 1] & 0x0F) * 100
|
||||
+ ((binData[FileAppVersionIndex + 1] & 0xF0) >> 4) * 1000);
|
||||
}
|
||||
/// <summary>
|
||||
/// Check the content of the binaries:
|
||||
@@ -2123,10 +2126,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// <remarks date="2022-Dec-05" author="Thomas Wiedebusch">
|
||||
/// - Core revision data type changed from string ti int32?.
|
||||
/// </remarks>
|
||||
public Boolean CheckCoreRevision(UInt32 coreRevision)
|
||||
public Boolean CheckCoreRevision(Int32? coreRevision)
|
||||
{
|
||||
if (null == CoreRevisionMaximum || null == CoreRevisionMinimum ||
|
||||
null == _packageDescriptionFile)
|
||||
null == _packageDescriptionFile || coreRevision == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -65,9 +65,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// <remarks date="2022-Dec-05" author="Thomas Wiedebusch">
|
||||
/// - Core revision data type changed from string ti int32?.
|
||||
/// </remarks>
|
||||
public static Boolean CheckCoreRevision(MeterFwUpdate meterFwUpdate, UInt32 coreRevision)
|
||||
public static Boolean CheckCoreRevision(MeterFwUpdate meterFwUpdate, Int32? coreRevision)
|
||||
{
|
||||
if (meterFwUpdate == null ) return false;
|
||||
if (coreRevision == null || meterFwUpdate == null ) return false;
|
||||
return meterFwUpdate.CheckCoreRevision(coreRevision);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
c43c40a030005a8f189e6179faf40a6d42bfef5c
|
||||
8fbe991b217e7692af4817ad205b768685aa5a72
|
||||
|
||||
Reference in New Issue
Block a user