- Bỏ log 0x00 seri_status
- Không check trạng thái countstart--> AutoSerialGet luôn
This commit is contained in:
+10
-25
@@ -638,11 +638,7 @@ namespace SafeBagDE70
|
|||||||
if (cCmdRsp.ChkCntEnd())
|
if (cCmdRsp.ChkCntEnd())
|
||||||
{
|
{
|
||||||
endflg = true;
|
endflg = true;
|
||||||
//Debug.WriteLine("END FLAG: "+cCmdRsp.recv_dat.dat[1]);
|
|
||||||
}
|
}
|
||||||
//Debug.WriteLine("START");
|
|
||||||
//Debug.WriteLine($"Num Serial: {seri_num}");
|
|
||||||
//Log.Information($"Num Serial: {seri_num}");
|
|
||||||
|
|
||||||
while (get_num < seri_num)
|
while (get_num < seri_num)
|
||||||
{
|
{
|
||||||
@@ -658,19 +654,6 @@ namespace SafeBagDE70
|
|||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
countSession.TempNotes[0]++;
|
countSession.TempNotes[0]++;
|
||||||
try
|
|
||||||
{
|
|
||||||
Log.Information(cCmdRsp.GetRecvDat());
|
|
||||||
if (cCmdRsp.recv_dat.leng > 17)
|
|
||||||
{
|
|
||||||
// noteVal = cCmdRsp.recv_dat.dat[17];
|
|
||||||
// UpdateCountSession(countSession, noteVal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(Exception ex)
|
|
||||||
{
|
|
||||||
Log.Error(ex, "Serial Status= 0x00");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 0x02:
|
case 0x02:
|
||||||
//TempNote[1] ++;
|
//TempNote[1] ++;
|
||||||
@@ -773,14 +756,16 @@ namespace SafeBagDE70
|
|||||||
serialPortDE70.DiscardOutBuffer();
|
serialPortDE70.DiscardOutBuffer();
|
||||||
|
|
||||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_CNTSTART);
|
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_CNTSTART);
|
||||||
if (cCmdRsp.recv_dat != null && cCmdRsp.recv_dat.dat[2] != 43) { }
|
//if (cCmdRsp.recv_dat != null && cCmdRsp.recv_dat.dat[2] != 43) {
|
||||||
do
|
//}
|
||||||
{
|
|
||||||
serialPortDE70.DiscardInBuffer();
|
//do
|
||||||
serialPortDE70.DiscardOutBuffer();
|
//{
|
||||||
cCmdRsp.SendXXCmd((byte)Command.CMD_SENSE);
|
// serialPortDE70.DiscardInBuffer();
|
||||||
}
|
// serialPortDE70.DiscardOutBuffer();
|
||||||
while (cCmdRsp.recv_dat != null && cCmdRsp.recv_dat.dat[1] == 0x09); //SR2 = 0x09 : Counting Status
|
// cCmdRsp.SendXXCmd((byte)Command.CMD_SENSE);
|
||||||
|
//}
|
||||||
|
//while (cCmdRsp.recv_dat != null && cCmdRsp.recv_dat.dat[1] == 0x09); //SR2 = 0x09 : Counting Status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user