fix Abnormal Storate
This commit is contained in:
+33
-13
@@ -708,15 +708,18 @@ namespace SafeBagDE70
|
||||
}
|
||||
public static bool ResetAbnormalStorage605()
|
||||
{
|
||||
|
||||
|
||||
|
||||
var cCmdRsp = AppData.cCmdRsp;
|
||||
bool bSuccess = false;
|
||||
|
||||
if (cCmdRsp != null)
|
||||
{
|
||||
Log.Information("START ABNORMAL STORAGE RESET PROC");
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_SENSE);
|
||||
LogCmdData();
|
||||
if (cCmdRsp.recv_dat != null &&(cCmdRsp.recv_dat.dat[1] == 0x1C && cCmdRsp.recv_dat.dat[2] == 0x4C))
|
||||
if (cCmdRsp.recv_dat != null &&
|
||||
((cCmdRsp.recv_dat.dat[18] & 0xF0) == 0xE0))
|
||||
{
|
||||
//0. Check notes in escrow or not?
|
||||
|
||||
@@ -748,38 +751,55 @@ namespace SafeBagDE70
|
||||
LogCmdData();
|
||||
recvData = cCmdRsp.recv_dat;
|
||||
var SR2 = recvData.dat[1];
|
||||
var S2 = recvData.dat[recvData.leng - 1];
|
||||
var S2 = recvData.dat[18];
|
||||
|
||||
if (SR2 == 0x1C && (S2==0xE2 || S2==0xE4))
|
||||
{
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_RESET);
|
||||
LogCmdData();
|
||||
Thread.Sleep(1000);
|
||||
for (int i=0;i<10;i++)
|
||||
{
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_SENSE);
|
||||
LogCmdData();
|
||||
Thread.Sleep(1000);
|
||||
S2 = recvData.dat[recvData.leng - 1];
|
||||
if (S2 == 0xE7)
|
||||
S2 = recvData.dat[18];
|
||||
SR2 = recvData.dat[1];
|
||||
if (SR2 == 0x07)
|
||||
break;
|
||||
}
|
||||
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
Thread.Sleep(2000);
|
||||
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_CNTSTART);
|
||||
LogCmdData();
|
||||
Thread.Sleep(1000);
|
||||
Thread.Sleep(2000);
|
||||
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_STORESTART);
|
||||
Thread.Sleep(2000);
|
||||
LogCmdData();
|
||||
if (cCmdRsp.recv_dat.dat[1] == 0x04 && cCmdRsp.recv_dat.dat[2] == 0x41)
|
||||
if ((cCmdRsp.recv_dat.dat[1] == 0x07 || cCmdRsp.recv_dat.dat[1]==0x09) && cCmdRsp.recv_dat.dat[2] == 0x41)
|
||||
{
|
||||
bSuccess = true;
|
||||
//Wait until SR2=0x04
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_SENSE);
|
||||
LogCmdData();
|
||||
Thread.Sleep(1000);
|
||||
|
||||
SR2 = recvData.dat[1];
|
||||
if (SR2 == 0x04)
|
||||
{
|
||||
bSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Log.Information("END ABNORMAL STORAGE RESET PROC");
|
||||
}
|
||||
}
|
||||
return bSuccess;
|
||||
@@ -1072,7 +1092,7 @@ namespace SafeBagDE70
|
||||
public int PrintingCountFromNPO = 0;//Transaction Count From Near Paper Out
|
||||
public bool IsStopPrinting()
|
||||
{
|
||||
if (IsPrinterNearPaperOut && PrintingCountFromNPO >= 20)
|
||||
if (IsPrinterNearPaperOut && PrintingCountFromNPO >= 50)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user