Add simulation mode in UniCB.
This commit is contained in:
parent
90cd53b05f
commit
6dc9520897
@ -8,6 +8,7 @@ using System.IO;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
@ -526,6 +527,17 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
Bridge.OnStateMachineTick(this, new StateMachineTickEventArgs(route, ProcessData.MsrmntAvailableFlags, ProcessData.MeasuredValues,
|
||||
ProcessData.AltStrings, ProcessData.Setpoints, ProcessData.CustomBitmaps));
|
||||
|
||||
/// Make simulation to finish - count
|
||||
if (cbCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(5000);
|
||||
Data.State |= (ulong)StatusP.TestCompleted;
|
||||
log.Debug("Simulation StatusP.TestCompleted in background.");
|
||||
});
|
||||
}
|
||||
|
||||
/// Make sure the serial port is open
|
||||
if (cbCfg.DebugLevel == DebugMode.Normal && (serialPort == null || !serialPort.IsOpen))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user