From 2d474ef17fe827b0c007886535da2e2cf652feda Mon Sep 17 00:00:00 2001 From: Nguyen Dinh Thuan Date: Thu, 19 Sep 2024 15:17:55 +0700 Subject: [PATCH] =?UTF-8?q?-=20B=E1=BB=8F=20log=200x00=20seri=5Fstatus=20-?= =?UTF-8?q?=20Kh=C3=B4ng=20check=20tr=E1=BA=A1ng=20th=C3=A1i=20countstart-?= =?UTF-8?q?->=20AutoSerialGet=20lu=C3=B4n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DepositSMUCv2.xaml.cs | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/DepositSMUCv2.xaml.cs b/DepositSMUCv2.xaml.cs index ef42383..1e656c7 100644 --- a/DepositSMUCv2.xaml.cs +++ b/DepositSMUCv2.xaml.cs @@ -638,11 +638,7 @@ namespace SafeBagDE70 if (cCmdRsp.ChkCntEnd()) { 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) { @@ -658,19 +654,6 @@ namespace SafeBagDE70 { case 0x00: 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; case 0x02: //TempNote[1] ++; @@ -773,14 +756,16 @@ namespace SafeBagDE70 serialPortDE70.DiscardOutBuffer(); cCmdRsp.SendXXCmd((byte)Command.CMD_DE_CNTSTART); - if (cCmdRsp.recv_dat != null && cCmdRsp.recv_dat.dat[2] != 43) { } - do - { - serialPortDE70.DiscardInBuffer(); - serialPortDE70.DiscardOutBuffer(); - cCmdRsp.SendXXCmd((byte)Command.CMD_SENSE); - } - while (cCmdRsp.recv_dat != null && cCmdRsp.recv_dat.dat[1] == 0x09); //SR2 = 0x09 : Counting Status + //if (cCmdRsp.recv_dat != null && cCmdRsp.recv_dat.dat[2] != 43) { + //} + + //do + //{ + // serialPortDE70.DiscardInBuffer(); + // serialPortDE70.DiscardOutBuffer(); + // cCmdRsp.SendXXCmd((byte)Command.CMD_SENSE); + //} + //while (cCmdRsp.recv_dat != null && cCmdRsp.recv_dat.dat[1] == 0x09); //SR2 = 0x09 : Counting Status }