Modbus modified, UniCB Init. modified, RunDeviceAfter() called in reversed order, ver. 3.1.1597
This commit is contained in:
@@ -179,12 +179,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
scopeAnalyzerData = null;
|
||||
switchCounterData = null;
|
||||
|
||||
serialPort = null;
|
||||
buffer = new byte[BUFFER_SIZE];
|
||||
rcvdData = new byte[BUFFER_SIZE];
|
||||
cumulativeSums = new int[BUFFER_SIZE];
|
||||
rcvdBytesCount = 0;
|
||||
|
||||
routeMask = 0;
|
||||
for (int i = 0; i < 128; i++)
|
||||
{
|
||||
@@ -194,19 +188,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
}
|
||||
|
||||
TBF.UiBridge.Bridge.RouteChangeHandler += delegate(object sndr, TBF.UiBridge.RouteChangeArgs args)
|
||||
{
|
||||
UInt128 mask = ((UInt128)1) << args.BitNr;
|
||||
if ((benchModelRoute & mask) == 0)
|
||||
{
|
||||
benchModelRoute |= mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
benchModelRoute &= (~mask);
|
||||
}
|
||||
};
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
@@ -233,12 +214,30 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
return;
|
||||
}
|
||||
|
||||
buffer = new byte[BUFFER_SIZE];
|
||||
rcvdData = new byte[BUFFER_SIZE];
|
||||
cumulativeSums = new int[BUFFER_SIZE];
|
||||
rcvdBytesCount = 0;
|
||||
|
||||
serialPort = new SerialPort(comPort, 9600, Parity.None, 8, StopBits.One);
|
||||
serialPort.DtrEnable = true;
|
||||
serialPort.WriteTimeout = 4000;
|
||||
serialPort.ParityReplace = 0xFF;
|
||||
serialPort.Open();
|
||||
|
||||
TBF.UiBridge.Bridge.RouteChangeHandler += delegate(object sndr, TBF.UiBridge.RouteChangeArgs args)
|
||||
{
|
||||
UInt128 mask = ((UInt128)1) << args.BitNr;
|
||||
if ((benchModelRoute & mask) == 0)
|
||||
{
|
||||
benchModelRoute |= mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
benchModelRoute &= (~mask);
|
||||
}
|
||||
};
|
||||
|
||||
log.FatalFormat("{0} - Device successfully initialized", Name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user