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