|
|
|
@ -47,6 +47,9 @@ public class StationReadyState : IState
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//plc是否是自动模式
|
|
|
|
|
var plcIsAuto = PlcIsAuto(machine);
|
|
|
|
|
if (InvokeStatus.Done != plcIsAuto)
|
|
|
|
@ -61,21 +64,19 @@ public class StationReadyState : IState
|
|
|
|
|
return SwappingStateMachine.ReturnWithInvokeErr(plcIsRemote, ExceptionReason.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////开启雷达
|
|
|
|
|
//var beginRadar = ControlRadar(machine, 1);
|
|
|
|
|
//if (InvokeStatus.Done != beginRadar)
|
|
|
|
|
//{
|
|
|
|
|
// return SwappingStateMachine.ReturnWithInvokeErr(beginRadar, ExceptionReason.None);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//开启雷达
|
|
|
|
|
var beginRadar = ControlRadar(machine, 1);
|
|
|
|
|
if (InvokeStatus.Done != beginRadar)
|
|
|
|
|
{
|
|
|
|
|
return SwappingStateMachine.ReturnWithInvokeErr(beginRadar, ExceptionReason.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//调整车辆
|
|
|
|
|
var adjustCarByRadar = AdjustCarByRadar(machine);
|
|
|
|
|
if (InvokeStatus.Done != adjustCarByRadar)
|
|
|
|
|
{
|
|
|
|
|
return SwappingStateMachine.ReturnWithInvokeErr(adjustCarByRadar, ExceptionReason.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////调整车辆
|
|
|
|
|
//var adjustCarByRadar = AdjustCarByRadar(machine);
|
|
|
|
|
//if (InvokeStatus.Done != adjustCarByRadar)
|
|
|
|
|
//{
|
|
|
|
|
// return SwappingStateMachine.ReturnWithInvokeErr(adjustCarByRadar, ExceptionReason.None);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//手动模式
|
|
|
|
|
if (StaticStationInfo.VehicleManually == 1)
|
|
|
|
@ -106,6 +107,12 @@ public class StationReadyState : IState
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new StateResult()
|
|
|
|
|
{
|
|
|
|
|
SwappingState = SwappingState.CarPrepare,
|
|
|
|
@ -139,7 +146,11 @@ public class StationReadyState : IState
|
|
|
|
|
|
|
|
|
|
//SoundApi.PlayOneSound((int)InfoEnum.SwapInfo.InfoStationModel) ;
|
|
|
|
|
LedClient.SendMsgByKey(InfoEnum.SwapInfo.InfoStationModel.GetLed());
|
|
|
|
|
}, true, () => { }, 5, InvokeStatus.None);
|
|
|
|
|
}, true,
|
|
|
|
|
() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}, 5, InvokeStatus.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|