|
|
@ -277,7 +277,7 @@ public class CarPrepareState : IState
|
|
|
|
SwapAmtOrder? swapAmtOrder = _CommonMgr.QueryAmtOrder(machine);
|
|
|
|
SwapAmtOrder? swapAmtOrder = _CommonMgr.QueryAmtOrder(machine);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Invoker.Invoke("selectPack", 500, 20, machine.IsCanceled,
|
|
|
|
return Invoker.Invoke("selectPack", 1000, 10, machine.IsCanceled,
|
|
|
|
() => machine.SelectPackFlag, () =>
|
|
|
|
() => machine.SelectPackFlag, () =>
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -294,8 +294,8 @@ 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)orderBatteryInfo.CanSwap);
|
|
|
|
|
|
|
|
Thread.Sleep(1000 * 3);
|
|
|
|
|
|
|
|
_log.Info($"SelectPack error CanSwap={machine.SwapOrderBatteryInfo.CanSwap}");
|
|
|
|
_log.Info($"SelectPack error CanSwap={machine.SwapOrderBatteryInfo.CanSwap}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -306,6 +306,11 @@ public class CarPrepareState : IState
|
|
|
|
_CommonMgr.SaveSwapBattery(machine);
|
|
|
|
_CommonMgr.SaveSwapBattery(machine);
|
|
|
|
machine.SelectPackFlag = true;
|
|
|
|
machine.SelectPackFlag = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, () => { machine.ExceptionReason = ExceptionReason.SelectPackError; });
|
|
|
|
}, () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
machine.ExceptionReason = ExceptionReason.SelectPackError;
|
|
|
|
|
|
|
|
SoundTool.PlayOneSound((int)InfoEnum.SwapInfo.ErrorSelectPack);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
,false,() => { },10,InvokeStatus.None);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|