Hitag fixes (#887)

* don't display error message during 'lf search' when no Hitag tag is present
* remove superfluous options in 'lf hitag read'
* fix setting of default threshold when selecting FPGA_CMD_SET_EDGE_DETECT_THRESHOLD major mode
* some refactoring
This commit is contained in:
pwpiwi 2019-11-25 08:38:23 +01:00 committed by GitHub
commit 00848e096b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 66 additions and 56 deletions

View file

@ -943,12 +943,12 @@ int CmdLFfind(const char *Cmd)
PrintAndLog("\nValid EM4x05/EM4x69 Chip Found\nUse lf em 4x05readword/dump commands to read\n");
return 1;
}
ans=CmdLFHitagReader("26"); // 26 = RHT2F_UID_ONLY
if (ans==0) {
if (getHitagUid(NULL, true)) {
PrintAndLog("\nValid Hitag2 tag Found!");
return 1;
}
ans=CmdCOTAGRead("");
if (ans>0) {
}
ans = CmdCOTAGRead("");
if (ans > 0) {
PrintAndLog("\nValid COTAG ID Found!");
return 1;
}