Fix gestione endianness x carico e num giri (leggeva sbagliato con littleEndian...)
This commit is contained in:
@@ -2609,12 +2609,18 @@ namespace MTC_Adapter
|
||||
// cicl su path x leggere le velocità dell'UnOp
|
||||
for (int i = 0; i < numUnOp; i++)
|
||||
{
|
||||
// leggo valore Codice
|
||||
locSpeedRate = BitConverter.ToUInt16(unOpSpeedMem, 2 * i);
|
||||
|
||||
// leggo valore Codice
|
||||
locSpeedRate = BitConverter.ToUInt16(unOpSpeedMem, 2 * i);
|
||||
// leggo 41° byte = indice 40 + 2*i x le var del carico UnOp
|
||||
UnOpLoad = unOpSpeedMem[40 + i];
|
||||
|
||||
// eventuale fix bigEndian...
|
||||
if (hasBigEndian)
|
||||
{
|
||||
locSpeedRate = Endian.SwapUInt16((ushort)locSpeedRate);
|
||||
}
|
||||
|
||||
vettUnOp[i].mUnOpSpeed.Value = locSpeedRate;
|
||||
vettUnOp[i].mUnOpLoad.Value = UnOpLoad;
|
||||
vettUnOp[i].mUnOpSpeedOverr.Value = SpeedRateOver;
|
||||
|
||||
Reference in New Issue
Block a user