diff --git a/Entity/Constant/InfoEnum.cs b/Entity/Constant/InfoEnum.cs index 388c03b..99e9eed 100644 --- a/Entity/Constant/InfoEnum.cs +++ b/Entity/Constant/InfoEnum.cs @@ -38,9 +38,9 @@ public class InfoEnum [Info("空仓数量不足","通道的电池仓无可用换电电池")] LessOfEmptyBinErr, [Info("符合soc限制数量不足","通道的电池仓无可用换电电池")] LessOfSocErr, [Info("结束充电大于3分钟的数量不足","通道的电池仓无可用换电电池")] LessOf3MinuteErr, - [Info("换电站处于手动模式,不能自动换电","换电站处于手动模式,不能自动换电")]InfoStationModel, + [Info("换电站处于手动模式,不能自动换电","换电站处于手动模式,不能自动换电")] InfoStationModel, - [Info("换电站处于本地模式,不能远程换电","换电站处于本地模式,不能远程换电")]InfoStationModelRemoteErr, + [Info("换电站处于本地模式,不能远程换电","换电站处于本地模式,不能远程换电")] InfoStationModelRemoteErr, } public enum SelectBinStatusInfo : byte diff --git a/Service/Execute/Step/StationReadyState.cs b/Service/Execute/Step/StationReadyState.cs index 8533be9..d401d41 100644 --- a/Service/Execute/Step/StationReadyState.cs +++ b/Service/Execute/Step/StationReadyState.cs @@ -78,6 +78,24 @@ public class StationReadyState : IState }; } + public InvokeStatus PlcIsAuto(SwappingStateMachine machine) + { + bool isAuto = false; + return Invoker.Invoke("check plc remote", 1000, 5, machine.IsCanceled, () => isAuto, + () => + { + if (PlcApi.IsAuto()) + { + isAuto = true; + } + }, + () => + { + SoundTool.PlayOneSound((int)InfoEnum.SwapInfo.InfoStationModel) + ; + }, true, () => { }, 5, InvokeStatus.None); + } + public InvokeStatus PlcIsRemote(SwappingStateMachine machine) { @@ -102,7 +120,7 @@ public class StationReadyState : IState { SoundTool.PlayOneSound((int)InfoEnum.SwapInfo.InfoStationModelRemoteErr) ; - }, true); + }, true, () => { }, 5, InvokeStatus.None); } public InvokeStatus EntranceRadar(SwappingStateMachine machine)