chg: 'hf mf nack' - adjustments in return values..

add: 'hf 14a info -n'  added new parameter,  to enable test for nack bug.
This commit is contained in:
iceman1001 2017-12-06 00:34:57 +01:00
commit 56dbf3ea15
3 changed files with 16 additions and 8 deletions

View file

@ -2606,7 +2606,7 @@ void DetectNACKbug() {
// Test if the action was cancelled
if(BUTTON_PRESS()) {
isOK = -1;
isOK = 99;
break;
}
@ -2675,7 +2675,7 @@ void DetectNACKbug() {
unexpected_random++;
if (unexpected_random > MAX_UNEXPECTED_RANDOM) {
// Card has an unpredictable PRNG. Give up
isOK = -3;
isOK = 98;
break;
} else {
if (sync_cycles <= 0) {
@ -2687,7 +2687,7 @@ void DetectNACKbug() {
}
if (++sync_tries > MAX_SYNC_TRIES) {
isOK = -4; // Card's PRNG runs at an unexpected frequency or resets unexpectedly
isOK = 97; // Card's PRNG runs at an unexpected frequency or resets unexpectedly
break;
}
@ -2697,7 +2697,7 @@ void DetectNACKbug() {
sync_cycles += PRNG_SEQUENCE_LENGTH;
if (sync_cycles > PRNG_SEQUENCE_LENGTH * 2 ) {
isOK = -4; // Card's PRNG runs at an unexpected frequency or resets unexpectedly
isOK = 96; // Card's PRNG runs at an unexpected frequency or resets unexpectedly
break;
}