|
@@ -81,7 +81,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
public void WaitForRobotResource(int robotID)
|
|
|
{
|
|
|
PLCMessage PLCMsg = null;
|
|
|
- while (true)
|
|
|
+ while (!isClosing)
|
|
|
{
|
|
|
lock (robot)
|
|
|
{
|
|
@@ -183,7 +183,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
cEntrance.parkingEntY = parkingEntY;
|
|
|
cEntrance.parkingEntZ = parkingEntZ;
|
|
|
Parking_Space ppp = new Parking_Space();
|
|
|
- while (true)
|
|
|
+ while (!isClosing)
|
|
|
{
|
|
|
if (!queueCmd.manual)
|
|
|
{
|
|
@@ -212,7 +212,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
bool jumpOut = false;
|
|
|
PLCMessage PLCMsg = null;
|
|
|
jumpOut = false;
|
|
|
- while (true)
|
|
|
+ while (!isClosing)
|
|
|
{
|
|
|
PLCMsg = (PLCMessage)PLC.GetMessage();
|
|
|
if (PLCMsg != null)
|
|
@@ -268,7 +268,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
private void WaitForStoreSignal(Command queueCmd, ref int parkingSpaceID, ref bool robotError)
|
|
|
{
|
|
|
PLCMessage PLCMsg = null;
|
|
|
- while (true)
|
|
|
+ while (!isClosing)
|
|
|
{
|
|
|
Thread.Sleep(1000);
|
|
|
PLCMsg = (PLCMessage)PLC.GetMessage();
|
|
@@ -606,7 +606,7 @@ namespace parkMonitor.server.CoreThread
|
|
|
//等待PLC取车完成信号
|
|
|
Task signalFromPLC = Task.Factory.StartNew(() =>
|
|
|
{
|
|
|
- while (true)
|
|
|
+ while (!isClosing)
|
|
|
{
|
|
|
Thread.Sleep(2000);
|
|
|
PLCMsg = (PLCMessage)PLC.GetMessage();
|