|
|
@ -47,6 +47,7 @@ public class StationReadyState : IState
|
|
|
|
machine);
|
|
|
|
machine);
|
|
|
|
|
|
|
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.WelcomeInfo.GetLed());
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.WelcomeInfo.GetLed());
|
|
|
|
|
|
|
|
Thread.Sleep(2000);
|
|
|
|
////开启雷达
|
|
|
|
////开启雷达
|
|
|
|
var beginRadar = ControlRadar(machine, 1);
|
|
|
|
var beginRadar = ControlRadar(machine, 1);
|
|
|
|
if (InvokeStatus.Done != beginRadar)
|
|
|
|
if (InvokeStatus.Done != beginRadar)
|
|
|
@ -346,8 +347,20 @@ public class StationReadyState : IState
|
|
|
|
Task<RfidReadModel?> rfidReadModel = RfidApi.ReadRfid();
|
|
|
|
Task<RfidReadModel?> rfidReadModel = RfidApi.ReadRfid();
|
|
|
|
rfidReadModel.Wait();
|
|
|
|
rfidReadModel.Wait();
|
|
|
|
var machineRfidReadModel = rfidReadModel.Result;
|
|
|
|
var machineRfidReadModel = rfidReadModel.Result;
|
|
|
|
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
if (rfidReadModel.IsCompletedSuccessfully && machineRfidReadModel != null
|
|
|
|
if (rfidReadModel.IsCompletedSuccessfully && machineRfidReadModel != null
|
|
|
|
&& machineRfidReadModel.Result == 1
|
|
|
|
&& machineRfidReadModel.Result == 1
|
|
|
|
&& !string.IsNullOrEmpty(machineRfidReadModel.VelVin))
|
|
|
|
&& !string.IsNullOrEmpty(machineRfidReadModel.VelVin))
|
|
|
@ -365,11 +378,11 @@ public class StationReadyState : IState
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RfidReadFlag,
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RfidReadFlag,
|
|
|
|
machine,param:JsonConvert.SerializeObject(machine.RfidReadModel));
|
|
|
|
machine,param:JsonConvert.SerializeObject(machine.RfidReadModel));
|
|
|
|
|
|
|
|
|
|
|
|
//RfidApi.StopRead();
|
|
|
|
|
|
|
|
// _log.Info("stop read rfid");
|
|
|
|
|
|
|
|
// RfidApi.DisConnect();
|
|
|
|
|
|
|
|
machine.RfidConnectFlag = false;
|
|
|
|
machine.RfidConnectFlag = false;
|
|
|
|
machine.RfidReadFlag = true;
|
|
|
|
machine.RfidReadFlag = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
Task<bool> beginRead = RfidApi.BeginRead();
|
|
|
|
Task<bool> beginRead = RfidApi.BeginRead();
|
|
|
|