fix sovrascrittura speedRate

This commit is contained in:
Samuele E. Locatelli
2017-05-17 12:34:12 +02:00
parent 08727e0647
commit 2cd4b63392
+5 -4
View File
@@ -966,7 +966,7 @@ namespace MTC_Adapter
public List<string>[] codaT;
#endregion
#region Events & samples
/// <summary>
@@ -2324,20 +2324,21 @@ namespace MTC_Adapter
StringBuilder sb = new StringBuilder();
int numUnOp = currAdpConf.nUnOp;
int locSpeedRate = 0;
// cicl su path x leggere le velocità dell'UnOp
for (int i = 0; i < numUnOp; i++)
{
// leggo valore Codice
SpeedRate = BitConverter.ToUInt16(unOpSpeedMem, 2 * i);
locSpeedRate = BitConverter.ToUInt16(unOpSpeedMem, 2 * i);
// leggo 41° byte = indice 40 + 2*i x le var del carico UnOp
UnOpLoad = unOpSpeedMem[40 + i];
vettUnOp[i].mUnOpSpeed.Value = SpeedRate;
vettUnOp[i].mUnOpSpeed.Value = locSpeedRate;
vettUnOp[i].mUnOpLoad.Value = UnOpLoad;
vettUnOp[i].mUnOpSpeedOverr.Value = SpeedRateOver;
sb.AppendLine(string.Format("UnOp_{0}: SpeedRate {1} rpm | Load {2}", i + 1, SpeedRate, UnOpLoad));
sb.AppendLine(string.Format("UnOp_{0}: SpeedRate {1} rpm | Load {2} | SpOv: {3}", i + 1, SpeedRate, UnOpLoad, SpeedRateOver));
}