雷达 超时 回归到原来

master
lxw 5 months ago
parent d973b95141
commit b560b11d7c

@ -119,6 +119,7 @@ public class StationReadyState : IState
string welcomeContent = "欢迎光临" + StaticStationInfo.StationName + "正在营业";
SoundApi.PlayOneSound((int)InfoEnum.SwapInfo.WelcomeInfo);
// machine.LedTool?.WriteContent(welcomeContent);
//查看雷达
isRemote = true;
}
}
@ -132,7 +133,7 @@ public class StationReadyState : IState
public InvokeStatus EntranceRadar(SwappingStateMachine machine)
{
return Invoker.Invoke("wait entrance radar", 1000, 5, machine.IsCanceled,
return Invoker.Invoke("wait entrance radar", 1000, 2, machine.IsCanceled,
() => machine.RadarInFlag, () =>
{
if (!PlcApi.EntranceRadar())
@ -146,7 +147,7 @@ public class StationReadyState : IState
_log.Info("entrance radar true");
machine.RadarInFlag = true;
}
});
}, () => { }, true, () => { }, 2, InvokeStatus.TimeOut);
}
public InvokeStatus BeginRead(SwappingStateMachine machine)
@ -211,11 +212,11 @@ public class StationReadyState : IState
Task<RfidReadModel?> rfidReadModel = RfidApi.ReadRfid();
rfidReadModel.Wait();
var machineRfidReadModel = rfidReadModel.Result;
if ( rfidReadModel.IsCompletedSuccessfully && machineRfidReadModel != null
&& machineRfidReadModel.Result==1
&& !string.IsNullOrEmpty(machineRfidReadModel.VelVin))
if (rfidReadModel.IsCompletedSuccessfully && machineRfidReadModel != null
&& machineRfidReadModel.Result == 1
&& !string.IsNullOrEmpty(machineRfidReadModel.VelVin))
{
machine.RfidReadModel = machineRfidReadModel;
_log.Info($"read rfid={JsonConvert.SerializeObject(machine.RfidReadModel)}");

Loading…
Cancel
Save