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