|
|
@ -216,18 +216,9 @@ public class StationReadyState : IState
|
|
|
|
PlcApi.Traffic(0);
|
|
|
|
PlcApi.Traffic(0);
|
|
|
|
i = 0;
|
|
|
|
i = 0;
|
|
|
|
a = 0;
|
|
|
|
a = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.diparkir.GetLed());
|
|
|
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.diparkir.GetLed());
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.diparkir.GetLed());
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.diparkir.GetLed());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RadarInFlag,
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RadarInFlag,
|
|
|
|
machine,type: machine.ManualSkipRadar? (int)SwapConstant.StepType.MANUAL :(int)SwapConstant.StepType.AUTO);
|
|
|
|
machine,type: machine.ManualSkipRadar? (int)SwapConstant.StepType.MANUAL :(int)SwapConstant.StepType.AUTO);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return PadarMgr._PadarClient?.CarState == 6 || machine.ManualSkipRadar;
|
|
|
|
return PadarMgr._PadarClient?.CarState == 6 || machine.ManualSkipRadar;
|
|
|
@ -247,15 +238,12 @@ public class StationReadyState : IState
|
|
|
|
che++;
|
|
|
|
che++;
|
|
|
|
if (che == 10)
|
|
|
|
if (che == 10)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.upcar.GetLed());
|
|
|
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.upcar.GetLed());
|
|
|
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.upcar.GetLed());
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.upcar.GetLed());
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music100);
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music100);
|
|
|
|
Thread.Sleep(6000);
|
|
|
|
Thread.Sleep(6000);
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music101);
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music101);
|
|
|
|
che = 1;
|
|
|
|
che = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
_log.Info("radar 车辆靠后");
|
|
|
|
_log.Info("radar 车辆靠后");
|
|
|
@ -268,8 +256,7 @@ public class StationReadyState : IState
|
|
|
|
i = 1;
|
|
|
|
i = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Muka.GetLed());
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Muka.GetLed());
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Muka.GetLed());
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Muka.GetLed());
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
_log.Info("radar 车辆靠前");
|
|
|
|
_log.Info("radar 车辆靠前");
|
|
|
@ -281,9 +268,9 @@ public class StationReadyState : IState
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music101);
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music101);
|
|
|
|
a = 0;
|
|
|
|
a = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Mundur.GetLed());
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Mundur.GetLed());
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Mundur.GetLed());
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.Mundur.GetLed());
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -296,7 +283,6 @@ public class StationReadyState : IState
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Task<bool> open = RfidApi.Connect();
|
|
|
|
// Task<bool> open = RfidApi.Connect();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
machine.RfidConnectFlag = true;
|
|
|
|
machine.RfidConnectFlag = true;
|
|
|
|
Task<bool> beginRead = RfidApi.BeginRead();
|
|
|
|
Task<bool> beginRead = RfidApi.BeginRead();
|
|
|
|
beginRead.Wait();
|
|
|
|
beginRead.Wait();
|
|
|
@ -311,8 +297,6 @@ public class StationReadyState : IState
|
|
|
|
machine.BeginRfidReadFlag = true;
|
|
|
|
machine.BeginRfidReadFlag = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, () =>
|
|
|
|
}, () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// machine.LedTool.WriteProgramContent(InfoEnum.SwapInfo.ErrorReadRfid.GetLed());
|
|
|
|
// machine.LedTool.WriteProgramContent(InfoEnum.SwapInfo.ErrorReadRfid.GetLed());
|
|
|
@ -390,6 +374,21 @@ public class StationReadyState : IState
|
|
|
|
// machine.LedTool!.WriteProgramContent(InfoEnum.SwapInfo.ErrorReadRfid.GetLed());
|
|
|
|
// machine.LedTool!.WriteProgramContent(InfoEnum.SwapInfo.ErrorReadRfid.GetLed());
|
|
|
|
SoundClient = AppInfo.Container.Resolve<SoundClient>();
|
|
|
|
SoundClient = AppInfo.Container.Resolve<SoundClient>();
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music42);
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music42);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Task<bool> beginRead = RfidApi.BeginRead();
|
|
|
|
|
|
|
|
beginRead.Wait();
|
|
|
|
|
|
|
|
if (!beginRead.Result)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_log.Info("begin read rfid error");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
machine.ExceptionReason = ExceptionReason.None;
|
|
|
|
|
|
|
|
_log.Info("begin read done");
|
|
|
|
|
|
|
|
machine.BeginRfidReadFlag = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, false, () => { machine.ExceptionReason = ExceptionReason.ReadRfidError; }, 30,
|
|
|
|
}, false, () => { machine.ExceptionReason = ExceptionReason.ReadRfidError; }, 30,
|
|
|
|
InvokeStatus.None);
|
|
|
|
InvokeStatus.None);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -427,6 +426,7 @@ public class StationReadyState : IState
|
|
|
|
|
|
|
|
|
|
|
|
SoundClient = AppInfo.Container.Resolve<SoundClient>();
|
|
|
|
SoundClient = AppInfo.Container.Resolve<SoundClient>();
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music42);
|
|
|
|
SoundClient.SoundPlay(SoundEnum.music42);
|
|
|
|
|
|
|
|
|
|
|
|
}, false, () => { machine.ExceptionReason = ExceptionReason.ReadRfidError; }, 30,
|
|
|
|
}, false, () => { machine.ExceptionReason = ExceptionReason.ReadRfidError; }, 30,
|
|
|
|
InvokeStatus.None);
|
|
|
|
InvokeStatus.None);
|
|
|
|
}
|
|
|
|
}
|
|
|
|