mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
hf iclass tear - only inform about read failures and keep on, instead of quiting command
This commit is contained in:
parent
0479a1b82e
commit
a223570dbf
1 changed files with 6 additions and 7 deletions
|
@ -3252,21 +3252,20 @@ static int CmdHFiClass_TearBlock(const char *Cmd) {
|
||||||
} else if (res != PM3_SUCCESS) {
|
} else if (res != PM3_SUCCESS) {
|
||||||
decrease = true;
|
decrease = true;
|
||||||
}
|
}
|
||||||
if (readcount >= 10){
|
|
||||||
PrintAndLogEx(WARNING, "\n"_RED_("Read failed too many times, giving up"));
|
|
||||||
isok = PM3_EFAILED;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
readcount++;
|
readcount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (readcount > 1) {
|
||||||
|
PrintAndLogEx(WARNING, "\nRead block failed "_RED_("%d") " times", readcount);
|
||||||
|
}
|
||||||
|
|
||||||
// if there was an error reading repeat the tearoff with the same delay
|
// if there was an error reading repeat the tearoff with the same delay
|
||||||
if (decrease && (tearoff_start > tearoff_increment) && (tearoff_start >= tearoff_original_start)) {
|
if (decrease && (tearoff_start > tearoff_increment) && (tearoff_start >= tearoff_original_start)) {
|
||||||
tearoff_start -= tearoff_increment;
|
tearoff_start -= tearoff_increment;
|
||||||
if(verbose){
|
if (verbose) {
|
||||||
PrintAndLogEx(INFO, " -> Read failed, retearing with "_CYAN_("%u")" us", tearoff_start);
|
PrintAndLogEx(INFO, " -> Read failed, retearing with "_CYAN_("%u")" us", tearoff_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tear_success = true;
|
bool tear_success = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue