Various.CoverTest component created, few Elde components removed, ver. 3.1.1609

This commit is contained in:
Milan Hanajik
2021-03-24 13:48:05 +01:00
parent ebf7c97bc6
commit 25856496d8
31 changed files with 303 additions and 2360 deletions
+23 -6
View File
@@ -134,6 +134,9 @@ namespace TBF.Rig.ControlBoard.Uni
///
Queue<Action> actionQueue;
bool isEmergencyStop;
/// UI actions are blocked when true
public bool IsUIBlocked { get; set; }
@@ -350,17 +353,31 @@ namespace TBF.Rig.ControlBoard.Uni
route = (route & ~bitsChangedByUI) | (displayedRoutePlusUI & bitsChangedByUI);
bitsChangedByUI = 0;
}
if ((StateMachine.Time - lastReceivedTime) >= 5)
{
/// No connection to control board ... set indicator bit
route += ((UInt128)1) << cbCfg.BitNr;
}
if ((State & (ulong)StatusP.EmgcyStopActive) != 0)
{
/// No connection to control board ... set indicator bit
route += ((UInt128)1) << (cbCfg.BitNr + 1);
route |= ((UInt128)1) << cbCfg.BitNr;
}
}
///
/// Handle emergency stop signal
///
bool newEmergencyStop = ((State & (ulong)StatusP.EmgcyStopActive) != 0);
if (newEmergencyStop)
{
/// Emergency stop ... set indicator bit
route |= ((UInt128)1) << (cbCfg.BitNr + 1);
if (!isEmergencyStop)
{
/// Stop the cycle ... the same as pressing 'STOP' button in the BenchControlPanel
TBF.UiBridge.Bridge.Ui2Bench(TBF.UiBridge.UI2BenchCmd.Stop);
}
}
isEmergencyStop = newEmergencyStop;
log.DebugFormat("Route synced with RRoute and UI changes, new route = {0}", Utils.RouteToStr(route));
}
+4 -7
View File
@@ -128,12 +128,6 @@ namespace TBF.Rig.ControlBoard.Uni
public string ToString(int i)
{
if (i == -1)
{
return string.Format("{0}: COM{1} DIVs={2} VBs={3} RVs={4} RelaysF={5} RelaysG={6} RelaysH={7}",
Name, ComPortNr, DivertersCount, DrainValvesCount, RegValvesCount, RelaysFInstalled, RelaysGInstalled, RelaysHInstalled);
}
switch (i)
{
case 0: return ComPortNr.ToString();
@@ -144,7 +138,10 @@ namespace TBF.Rig.ControlBoard.Uni
case 5: return RelaysGInstalled ? Strings.yes : Strings.no;
case 6: return RelaysHInstalled ? Strings.yes : Strings.no;
case 7: return ShowState ? Strings.yes : Strings.no;
default: return string.Empty;
default:
return string.Format("{0}: COM{1} DIVs={2} VBs={3} RVs={4} RelaysF={5} RelaysG={6} RelaysH={7}",
Name, ComPortNr, DivertersCount, DrainValvesCount, RegValvesCount,
RelaysFInstalled, RelaysGInstalled, RelaysHInstalled);
}
}