关于语音

master
lxw 6 months ago
parent ef0e003a81
commit ea5d955485

@ -6,48 +6,50 @@ public class InfoEnum
{ {
public enum SwapInfo : ushort public enum SwapInfo : ushort
{ {
[Info("Rfid读写失败", "Rfid读写失败")] ErrorReadRfid = 1,
[Info("Tbox连接失败", "Tbox连接失败请联系站务人员")] ErrorTBoxConn = 4, [Info("欢迎光临长治换电站!(正在营业)","欢迎光临长治换电站!,本站正在营业中")]WelcomeInfo=1,
[Info("云端校验失败", "云端校验失败,请联系站务人员")] ErrorCloudCheck = 5, [Info("Rfid读写失败", "Rfid读写失败")] ErrorReadRfid ,
[Info("车辆已到位", "车辆已到位")] InfoCarInPosition = 6,
[Info("车辆到位超时", "车辆到位超时")] ErrorCarInPositionTimeout = 7,
[Info("云平台下发换电失败", "云平台下发换电超时")] CloudSendSwapError = 8,
[Info("云平台下发取消换电", "云平台下发取消换电")] CloudSendSwapCancel = 9,
[Info("Tbox连接失败", "Tbox连接失败请联系站务人员")] ErrorTBoxConn ,
[Info("云端校验失败", "云端校验失败,请联系站务人员")] ErrorCloudCheck ,
[Info("车辆已到位", "车辆已到位")] InfoCarInPosition ,
[Info("车辆到位超时", "车辆到位超时")] ErrorCarInPositionTimeout,
[Info("云平台下发换电失败", "云平台下发换电超时")] CloudSendSwapError ,
[Info("解锁车辆失败", "解锁车辆失败")] ErrUnLockCar = 10,
[Info("下发选包结果失败", "下发选包结果失败")] ErrDistributeSelectPack = 11, [Info("解锁车辆失败", "解锁车辆失败")] ErrUnLockCar ,
[Info("选包失败,请驶离", "选包失败,请驶离")] ErrorSelectPack = 12, [Info("选包失败,请驶离", "选包失败,请驶离")] ErrorSelectPack ,
[Info("通道拍照定位失败,请重新调整车辆位置", "通道拍照定位失败,请重新调整车辆位置")] [Info("通道拍照定位失败,请重新调整车辆位置", "通道拍照定位失败,请重新调整车辆位置")]
ErrChannelStatus = 14, ErrChannelStatus ,
[Info("电池拆卸中,请稍后", "电池拆卸中,请稍后")] InfoUnPack = 15, [Info("电池拆卸中,请稍后", "电池拆卸中,请稍后")] InfoUnPack ,
[Info("电池安装中,请稍后", "电池安装中,请稍后")] InfoPack = 16, [Info("电池安装中,请稍后", "电池安装中,请稍后")] InfoPack ,
[Info("电池包已安装完成", "电池包已安装完成")] InfoPackFinish = 17, [Info("电池包已安装完成", "电池包已安装完成")] InfoPackFinish ,
[Info("航车已回归安全位置", "航车已回归安全位置")] InfoToSafePosition = 18, [Info("航车已回归安全位置", "航车已回归安全位置")] InfoToSafePosition ,
[Info("换电已完成,请驶离", "换电已完成,请驶离")] InfoCarLeave = 20, [Info("换电已完成,请驶离", "换电已完成,请驶离")] InfoCarLeave ,
[Info("换电失败,请驶离", "换电失败,请驶离")] ErrInfoCarLeave = 21, [Info("换电失败,请驶离", "换电失败,请驶离")] ErrInfoCarLeave ,
[Info("旧电池搬运中,请稍后", "旧电池搬运中,请稍后")] InfoOldBatteryCarryIn = 22, [Info("旧电池搬运中,请稍后", "旧电池搬运中,请稍后")] InfoOldBatteryCarryIn ,
[Info("旧电池搬运中,请稍后", "旧电池搬运中,请稍后")] InfoNewBatteryCarryOut = 23, [Info("旧电池搬运中,请稍后", "旧电池搬运中,请稍后")] InfoNewBatteryCarryOut ,
[Info("上锁车辆失败", "上锁车辆失败")] ErrLockCar = 24, [Info("车辆上锁失败", "车辆上锁失败")] ErrLockCar ,
[Info("通道的电池仓无可用换电电池","通道的电池仓无可用换电电池")] NoBatteryErr,
[Info("结束充电电池数量不足","通道的电池仓无可用换电电池")] LessOfFinishChargingErr,
[Info("空仓数量不足","通道的电池仓无可用换电电池")] LessOfEmptyBinErr,
[Info("符合soc限制数量不足","通道的电池仓无可用换电电池")] LessOfSocErr,
[Info("结束充电大于3分钟的数量不足","通道的电池仓无可用换电电池")] LessOf3MinuteErr,
} }
public enum SelectBinStatusInfo : byte public enum SelectBinStatusInfo : byte
{ {
[Remark("通道的电池仓无换电电池")] NoBattery, [Remark("通道的电池仓无可用换电电池")] NoBattery,
[Remark("可以换电")] Success, [Remark("可以换电")] Success,
[Remark("结束充电电池数量不足")] LessOfFinishCharging, [Remark("结束充电电池数量不足")] LessOfFinishCharging,
[Remark("空仓不够放")] LessOfEmptyBin, [Remark("空仓数量不足")] LessOfEmptyBin,
[Remark("符合soc限制数量不足")] LessOfSoc, [Remark("符合soc限制数量不足")] LessOfSoc,
[Remark("结束充电大于3分钟的数量不足")] LessOf3Minute, [Remark("结束充电大于3分钟的数量不足")] LessOf3Minute,
[Remark("各种差数量不足")] LessOfMean,
[Remark("预约电池异常")] AmtError, [Remark("预约电池异常")] AmtError,
[Remark("电池捆绑选包失败")] GroupError,
[Remark("无可用捆绑")] NoGroupError
} }

@ -1,5 +1,6 @@
using Service.BusinessTask; using Service.BusinessTask;
using Service.BusinessTask.MyTask; using Service.BusinessTask.MyTask;
using Service.Execute.StaticTools;
namespace Service.Execute namespace Service.Execute
{ {
@ -41,6 +42,7 @@ namespace Service.Execute
/// </summary> /// </summary>
public static void SwappingStateMachineStart() public static void SwappingStateMachineStart()
{ {
SoundTool.PlayOneSound(2);
SwappingStateMachine.Start(); SwappingStateMachine.Start();
} }

@ -292,7 +292,7 @@ public class CarPrepareState : IState
if (orderBatteryInfo.CanSwap != InfoEnum.SelectBinStatusInfo.Success) if (orderBatteryInfo.CanSwap != InfoEnum.SelectBinStatusInfo.Success)
{ {
// machine.LedTool?.WriteProgramContent(InfoEnum.SwapInfo.ErrorSelectPack.GetLed()); // machine.LedTool?.WriteProgramContent(InfoEnum.SwapInfo.ErrorSelectPack.GetLed());
SoundTool.PlayOneSound((int)InfoEnum.SwapInfo.ErrorSelectPack); SoundTool.PlayOneSound((int)orderBatteryInfo.CanSwap);
Thread.Sleep(1000 * 3); Thread.Sleep(1000 * 3);
_log.Info($"SelectPack error CanSwap={machine.SwapOrderBatteryInfo.CanSwap}"); _log.Info($"SelectPack error CanSwap={machine.SwapOrderBatteryInfo.CanSwap}");
} }

@ -92,7 +92,7 @@ public class StationReadyState : IState
{ {
//LED显示-欢迎光临_换电站点_正在营业 //LED显示-欢迎光临_换电站点_正在营业
string welcomeContent = "欢迎光临" + StaticStationInfo.StationName + "正在营业"; string welcomeContent = "欢迎光临" + StaticStationInfo.StationName + "正在营业";
SoundTool.PlayOneSound((int)InfoEnum.SwapInfo.WelcomeInfo);
// machine.LedTool?.WriteContent(welcomeContent); // machine.LedTool?.WriteContent(welcomeContent);
isRemote = true; isRemote = true;
} }

@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using Service.Cloud.Client; using Service.Cloud.Client;
using Service.Execute; using Service.Execute;
using Service.Execute.StaticTools;
using Service.Plc.Client; using Service.Plc.Client;
using SqlSugar; using SqlSugar;
using SqlSugar.IOC; using SqlSugar.IOC;
@ -152,10 +153,8 @@ AppInfo.Container = app.Services.GetAutofacRoot();
//云平台 //云平台
CloudClientMgr.Init(); CloudClientMgr.Init();
//PLC //PLC
PlcMgr.Init(); PlcMgr.Init();
//启动换电流程 //启动换电流程
StationSoftMgr.SwappingStateMachineStart(); StationSoftMgr.SwappingStateMachineStart();
//StationSoftMgr.StartTasks(); //StationSoftMgr.StartTasks();

Loading…
Cancel
Save