|
|
|
@ -44,19 +44,6 @@ public class StationReadyState : IState
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//plc是否是自动模式
|
|
|
|
|
var plcIsAuto = PlcIsAuto(machine);
|
|
|
|
|
if (InvokeStatus.Done != plcIsAuto)
|
|
|
|
|
{
|
|
|
|
|
return SwappingStateMachine.ReturnWithInvokeErr(plcIsAuto, ExceptionReason.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////plc是否是远程模式
|
|
|
|
|
var plcIsRemote = PlcIsRemote(machine);
|
|
|
|
|
if (InvokeStatus.Done != plcIsRemote)
|
|
|
|
|
{
|
|
|
|
|
return SwappingStateMachine.ReturnWithInvokeErr(plcIsRemote, ExceptionReason.None);
|
|
|
|
|
}
|
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.Idel,
|
|
|
|
|
machine);
|
|
|
|
|
|
|
|
|
@ -74,6 +61,24 @@ public class StationReadyState : IState
|
|
|
|
|
return SwappingStateMachine.ReturnWithInvokeErr(adjustCarByRadar, ExceptionReason.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//plc是否是自动模式
|
|
|
|
|
var plcIsAuto = PlcIsAuto(machine);
|
|
|
|
|
if (InvokeStatus.Done != plcIsAuto)
|
|
|
|
|
{
|
|
|
|
|
return SwappingStateMachine.ReturnWithInvokeErr(plcIsAuto, ExceptionReason.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////plc是否是远程模式
|
|
|
|
|
var plcIsRemote = PlcIsRemote(machine);
|
|
|
|
|
if (InvokeStatus.Done != plcIsRemote)
|
|
|
|
|
{
|
|
|
|
|
return SwappingStateMachine.ReturnWithInvokeErr(plcIsRemote, ExceptionReason.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.Plc,
|
|
|
|
|
machine);
|
|
|
|
|
|
|
|
|
|
//手动模式
|
|
|
|
|
if (StaticStationInfo.VehicleManually == 1)
|
|
|
|
|
{
|
|
|
|
@ -188,7 +193,7 @@ public class StationReadyState : IState
|
|
|
|
|
return Invoker.Invoke("begin Radar", 1000, 20, machine.IsCanceled, () => PadarMgr._PadarClient?.CarState > 0,
|
|
|
|
|
() => { PadarMgr._PadarClient?.PadarControl(flag); });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public InvokeStatus AdjustCarByRadar(SwappingStateMachine machine)
|
|
|
|
|
{
|
|
|
|
@ -200,9 +205,13 @@ public class StationReadyState : IState
|
|
|
|
|
|
|
|
|
|
if (PadarMgr._PadarClient?.CarState == 6)
|
|
|
|
|
{
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Backoff.GetLed());
|
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RadarInFlag,
|
|
|
|
|
machine);
|
|
|
|
|
if (PadarMgr._PadarClient?.CarState == 6)
|
|
|
|
|
{
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Backoff.GetLed());
|
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RadarInFlag,
|
|
|
|
|
machine);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return PadarMgr._PadarClient?.CarState == 6;
|
|
|
|
@ -225,6 +234,7 @@ public class StationReadyState : IState
|
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music100);
|
|
|
|
|
Thread.Sleep(3000);
|
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music101);
|
|
|
|
|
Thread.Sleep(3000);
|
|
|
|
|
che = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|