master
zby 1 month ago
parent bf792aa87b
commit 3ca601a8d6

@ -33,7 +33,7 @@ public class InfoEnum
[Info("电池安装中,请稍后", "电池安装中,请稍后")] InfoPack ,//12
[Info("电池包已安装完成", "电池包已安装完成")] InfoPackFinish ,//13
[Info("航车已回归安全位置", "航车已回归安全位置")] InfoToSafePosition ,//14
[Info("换电已完成,请驶离", "换电已完成,请驶离")] InfoCarLeave ,//15
[Info("换电失败,请驶离", "换电失败,请驶离")] ErrInfoCarLeave ,//16
[Info("电池入仓中,请稍后", "电池入仓中,请稍后")] InfoOldBatteryCarryIn ,//17
[Info("电池出仓中,请稍后", "电池出仓中,请稍后")] InfoNewBatteryCarryOut ,//18
@ -64,6 +64,9 @@ public class InfoEnum
[Info("Itu diparkir 停好了", "Itu diparkir 停好了")] diparkir,
[Info("退出重新停车", "退出重新停车")] upcar,
[Info("开始换电印尼中文", "开始换电印尼中文")] StartSwap,
[Info("换电完成", "换电完成")] InfoCarLeave,//15
[Info("请驶离", "请驶离")] PleaseAway,//15
}

@ -182,7 +182,11 @@ public class CarPrepareState : IState
{
a = 0;
i = 0;
LedClient.SendMsgByKey(InfoEnum.SwapInfo.diparkir.GetLed());
for (int i = 0; i < 8; i++)
{
LedClient.SendMsgByKey(InfoEnum.SwapInfo.diparkir.GetLed());
}
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.Carradar,
machine,type: machine.ManualSkipRadar? (int)SwapConstant.StepType.MANUAL :(int)SwapConstant.StepType.AUTO);

@ -141,7 +141,11 @@ public class DoSwappingState : IState
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.StartSwappingFlag,
machine);
LedClient.SendMsgByKey(InfoEnum.SwapInfo.StartSwap.GetLed());
for (int i = 0; i < 8; i++)
{
LedClient.SendMsgByKey(InfoEnum.SwapInfo.StartSwap.GetLed());
}
//LedClient.SendMsgByKey(InfoEnum.SwapInfo.StartSwap.GetLed());
//查詢當前任務狀態是否被更改
if (startSwapping)
{

@ -216,7 +216,14 @@ public class StationReadyState : IState
PlcApi.Traffic(0);
i = 0;
a = 0;
LedClient.SendMsgByKey(InfoEnum.SwapInfo.diparkir.GetLed());
for (int i = 0; i < 8; i++)
{
LedClient.SendMsgByKey(InfoEnum.SwapInfo.diparkir.GetLed());
}
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RadarInFlag,
machine,type: machine.ManualSkipRadar? (int)SwapConstant.StepType.MANUAL :(int)SwapConstant.StepType.AUTO);

@ -74,7 +74,7 @@ public class SwapDoneState : IState
return SwappingStateMachine.ReturnWithInvokeErr(lockCar, ExceptionReason.None);
}
LedClient.SendMsgByKey(InfoEnum.SwapInfo.InfoCarLeave.GetLed());
//出口雷达监测
@ -215,8 +215,11 @@ public class SwapDoneState : IState
//_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.VelLockFlag,
// machine);
var SoundClient = AppInfo.Container.Resolve<SoundClient>();
SoundClient.SoundPlay(SoundEnum.music76);
for (int e = 0; e < 8; e++)
{
LedClient.SendMsgByKey(InfoEnum.SwapInfo.InfoCarLeave.GetLed());
}
SoundClient.SoundPlay(SoundEnum.music76);
Thread.Sleep(7000);
SoundClient.SoundPlay(SoundEnum.music77);
// SoundClient.SoundPlay(SoundEnum.music77);
@ -226,9 +229,9 @@ public class SwapDoneState : IState
? (int)InfoEnum.SwapInfo.InfoCarLeave
: (int)InfoEnum.SwapInfo.ErrInfoCarLeave);
LedClient.SendMsgByKey(machine.SwapStatus == (int)InfoEnum.SwapOrderResult.Success
? InfoEnum.SwapInfo.InfoCarLeave.GetLed()
: InfoEnum.SwapInfo.ErrInfoCarLeave.GetLed());
//LedClient.SendMsgByKey(machine.SwapStatus == (int)InfoEnum.SwapOrderResult.Success
// ? InfoEnum.SwapInfo.PleaseAway.GetLed()
// : InfoEnum.SwapInfo.PleaseAway.GetLed());
machine.VelLockFlag = true;
//断连Tbox
@ -301,8 +304,11 @@ public class SwapDoneState : IState
machine.ExceptionReason = ExceptionReason.None;
_log.Info("exist radar true");
PlcApi.Traffic(1);
for (int a = 0; a < 8; a++)
{
LedClient.SendMsgByKey(InfoEnum.SwapInfo.PleaseAway.GetLed());
}
PlcApi.Traffic(1);
//出口写红灯
//更新车辆离场时间,上报云平台
//machine.BusinessSwappingForCloudState =

@ -95,8 +95,9 @@ public class LedClient
{"停好了",new byte[]{ 0x55,0xAA,0x00,0x00,0x01,0x01,0x00,0xD9,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x14,0x00,0x25,0x64,0x69,0x73,0x70,0x30,0x3B,0x3A,0x49,0x74,0x75,0x20,0x64,0x69,0x70,0x61,0x72,0x6B,0x69,0x72,0x00,0x00,0x0D,0x0A,}},
{"Itu diparkir 停好了",new byte[]{ 0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x31, 0x49, 0x74, 0x75, 0x20, 0x64, 0x69, 0x70, 0x61, 0x72, 0x6B, 0x69, 0x72, 0x20, 0xCD, 0xA3, 0xBA, 0xC3, 0xC1, 0xCB, 0x00, 0x00, 0x0D, 0x0A, }},
{"退出重新停车",new byte[]{ 0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0x4B, 0x65, 0x6C, 0x75, 0x61, 0x72, 0x20, 0x64, 0x61, 0x6E, 0x20, 0x70, 0x61, 0x72, 0x6B, 0x69, 0x72, 0x20, 0x6B, 0x65, 0x6D, 0x62, 0x61, 0x6C, 0x69, 0x00, 0x00, 0x0D, 0x0A, }},
{"开始换电印尼中文",new byte[]{ 0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0x4D, 0x75, 0x6C, 0x61, 0x69, 0x20, 0x67, 0x61, 0x6E, 0x74, 0x69, 0x20, 0x62, 0x61, 0x74, 0x65, 0x72, 0x61, 0x69, 0x00, 0x00, 0x0D, 0x0A,0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0xBF, 0xAA, 0xCA, 0xBC, 0xBB, 0xBB, 0xB5, 0xE7, 0x00, 0x00, 0x0D, 0x0A }},
{"换电已完成,请驶离",new byte[]{0x55,0xAA,0x00,0x00,0x01,0x01,0x00,0xD9,0x00,0x00,0x00,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x3B,0x00,0x25,0x64,0x69,0x73,0x70,0x30,0x3A,0x3A,0x50,0x65,0x72,0x74,0x75,0x6B,0x61,0x72,0x61,0x6E,0x20,0x62,0x61,0x74,0x65,0x72,0x61,0x69,0x20,0x74,0x65,0x6C,0x61,0x68,0x20,0x73,0x65,0x6C,0x65,0x73,0x61,0x69,0x2C,0x20,0x73,0x69,0x6C,0x61,0x6B,0x61,0x6E,0x20,0x70,0x65,0x72,0x67,0x69,0x0D,0x0A,0x0D,0x0A,0x00,0x00,0x0D,0x0A,0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x16, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0xBB, 0xBB, 0xB5, 0xE7, 0xCD, 0xEA, 0xB3, 0xC9, 0xA3, 0xAC, 0xCA, 0xBB, 0xC0, 0xEB, 0x00, 0x00, 0x0D, 0x0A,}},
{"开始换电印尼中文",new byte[]{ 0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0x4D, 0x75, 0x6C, 0x61, 0x69, 0x20, 0x70, 0x65, 0x72, 0x74, 0x75, 0x6B, 0x61, 0x72, 0x61, 0x6E, 0x20, 0x62, 0x61, 0x74, 0x65, 0x72, 0x61, 0x69, 0x00, 0x00, 0x0D, 0x0A,0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0xBF, 0xAA, 0xCA, 0xBC, 0xBB, 0xBB, 0xB5, 0xE7, 0x00, 0x00, 0x0D, 0x0A, }},
{"换电完成",new byte[]{0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x22, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0x50, 0x65, 0x72, 0x74, 0x75, 0x6B, 0x61, 0x72, 0x61, 0x6E, 0x20, 0x62, 0x61, 0x74, 0x65, 0x72, 0x61, 0x69, 0x20, 0x73, 0x65, 0x6C, 0x65, 0x73, 0x61, 0x69, 0x00, 0x00, 0x0D, 0x0A,0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0xBB, 0xBB, 0xB5, 0xE7, 0xCD, 0xEA, 0xB3, 0xC9, 0x00, 0x00, 0x0D, 0x0A}},
{"请驶离",new byte[]{0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x15, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0x53, 0x69, 0x6C, 0x61, 0x6B, 0x61, 0x6E, 0x20, 0x70, 0x65, 0x72, 0x67, 0x69, 0x00, 0x00, 0x0D, 0x0A,0x55, 0xAA, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x25, 0x64, 0x69, 0x73, 0x70, 0x30, 0x3B, 0x3A, 0xC7, 0xEB, 0xCA, 0xBB, 0xC0, 0xEB, 0x00, 0x00, 0x0D, 0x0A}},
};
#endregion

Loading…
Cancel
Save