@@ -25,7 +25,7 @@ public enum TaskCancelRReason {
2525 Button button ; String buttonText ;
2626 TextView registerRunTime , registerTagGot , registerVoltageLevel ;
2727 TextView registerYield , registerTotal ;
28- boolean invalidRequest ;
28+ boolean invalidRequest , selectOne = false ;
2929 String selectMask ; int selectBank , selectOffset ;
3030 String strPassword ; int powerLevel ;
3131 RfidReaderChipData .HostCommands hostCommand ;
@@ -49,7 +49,7 @@ public enum TaskCancelRReason {
4949 int batteryCountInventory_old ;
5050 boolean bSkipClearFilter = false ;
5151
52- public AccessTask (Button button , boolean invalidRequest ,
52+ public AccessTask (Button button , boolean invalidRequest , boolean selectOne ,
5353 String selectMask , int selectBank , int selectOffset ,
5454 String strPassword , int powerLevel , RfidReaderChipData .HostCommands hostCommand ,
5555 boolean bEnableErrorPopWindow , Runnable updateRunnable ) {
@@ -58,6 +58,7 @@ public AccessTask(Button button, boolean invalidRequest,
5858 this .registerVoltageLevel = registerVoltageLevel ;
5959
6060 this .invalidRequest = invalidRequest ; MainActivity .csLibrary4A .appendToLog ("invalidRequest = " + invalidRequest );
61+ this .selectOne = selectOne ;
6162 this .selectMask = selectMask ;
6263 this .selectBank = selectBank ;
6364 this .selectOffset = selectOffset ;
@@ -72,7 +73,7 @@ public AccessTask(Button button, boolean invalidRequest,
7273 }
7374 preExecute ();
7475 }
75- public AccessTask (Button button , TextView textViewWriteCount , boolean invalidRequest ,
76+ public AccessTask (Button button , TextView textViewWriteCount , boolean invalidRequest , boolean selectOne ,
7677 String selectMask , int selectBank , int selectOffset ,
7778 String strPassword , int powerLevel , RfidReaderChipData .HostCommands hostCommand ,
7879 int qValue , int repeat , boolean resetCount , boolean bSkipClearFilter ,
@@ -86,6 +87,7 @@ public AccessTask(Button button, TextView textViewWriteCount, boolean invalidReq
8687 this .registerTotal = registerTotalView ;
8788
8889 this .invalidRequest = invalidRequest ; MainActivity .csLibrary4A .appendToLog ("invalidRequest = " + invalidRequest );
90+ this .selectOne = selectOne ;
8991 this .selectMask = selectMask ;
9092 this .selectBank = selectBank ;
9193 this .selectOffset = selectOffset ;
@@ -96,6 +98,7 @@ public AccessTask(Button button, TextView textViewWriteCount, boolean invalidReq
9698 if (repeat > 255 ) repeat = 255 ;
9799 this .repeat = repeat ;
98100 this .bSkipClearFilter = bSkipClearFilter ;
101+ if (bSkipClearFilter ) this .selectOne = false ;
99102 if (resetCount ) {
100103 total = 0 ;
101104 tagList .clear ();
@@ -151,19 +154,18 @@ else if (hostCommand == RfidReaderChipData.HostCommands.CMD_18K6CKILL) {
151154 invalidRequest = true ; MainActivity .csLibrary4A .appendToLog ("setAccessRetry is failed" );
152155 }
153156 }
154- MainActivity .csLibrary4A .appendToLog ("setSelectCriteria: invalidRequest = " + invalidRequest + ", repeat = " + repeat + ", bSkipClearFilter = " + bSkipClearFilter + ", powerLevel = " + powerLevel + ", skipSelect = " + skipSelect );
155157 if (invalidRequest == false ) {
156158 if (DEBUG ) MainActivity .csLibrary4A .appendToLog ("AccessTask(): powerLevel = " + powerLevel );
157159 int matchRep = 1 ;
158160 if (repeat > 1 ) matchRep = repeat ;
159- if (bSkipClearFilter == false ) {
161+ if (false && bSkipClearFilter == false ) {
160162 MainActivity .csLibrary4A .appendToLog ("Going to setSelectCriteria disable" );
161163 MainActivity .csLibrary4A .setSelectCriteriaDisable (-1 );
162164 }
163165 if (powerLevel < 0 || powerLevel > 330 ) invalidRequest = true ;
164166 else if (skipSelect == false ) {
165- MainActivity .csLibrary4A .appendToLog ("setSelectCriteria: Going to setSelectTag" );
166- if (MainActivity .csLibrary4A .setSelectedTag (selectMask , selectBank , selectOffset , powerLevel , qValue , matchRep ) == false ) {
167+ MainActivity .csLibrary4A .appendToLog ("AccessTask.preExecute goes to setSelectTag" );
168+ if (MainActivity .csLibrary4A .setSelectedTag (selectOne , selectMask , selectBank , selectOffset , powerLevel , qValue , matchRep ) == false ) {
167169 invalidRequest = true ; MainActivity .csLibrary4A .appendToLog ("setSelectedTag is failed with selectMask = " + selectMask + ", selectBank = " + selectBank + ", selectOffset = " + selectOffset + ", powerLevel = " + powerLevel );
168170 }
169171 }
@@ -178,6 +180,7 @@ else if (skipSelect == false) {
178180 if (MainActivity .csLibrary4A .checkHostProcessorVersion (MainActivity .csLibrary4A .getMacVer (), 2 , 6 , 8 )) {
179181 MainActivity .csLibrary4A .setInvModeCompact (false );
180182 }
183+ //MainActivity.csLibrary4A.setTagRead(0);
181184 MainActivity .csLibrary4A .sendHostRegRequestHST_CMD (hostCommand );
182185 }
183186 }
@@ -226,6 +229,7 @@ else if (rx000pkgData != null) {
226229 if (rx000pkgData .decodedError != null ) { endingMessaage = rx000pkgData .decodedError ; ending = true ; }
227230 else if (repeat > 0 && resultError .length () == 0 ) {
228231 resultError = "" ;
232+ if (true ) MainActivity .csLibrary4A .appendToLog ("Debug_InvCfg: AccessTask.doInBackground goes to setMatchRep with repeat = " + repeat );
229233 MainActivity .csLibrary4A .setMatchRep (repeat );
230234 MainActivity .csLibrary4A .sendHostRegRequestHST_CMD (hostCommand );
231235 } else {
@@ -319,7 +323,7 @@ protected void onPostExecute(String result) {
319323 }
320324
321325 void DeviceConnectTask4RegisterEnding () {
322- MainActivity .csLibrary4A .setAccessCount (0 );
326+ // MainActivity.csLibrary4A.setAccessCount(0);
323327 String strErrorMessage = "" ;
324328 if (false ) {
325329 boolean success = false ;
0 commit comments