Replace WITH_HITAG by dynamic detection in client

This commit is contained in:
Philippe Teuwen 2019-05-01 23:26:06 +02:00
commit d7b53aacee
2 changed files with 10 additions and 12 deletions

View file

@ -865,9 +865,9 @@ int CmdLFfind(const char *Cmd) {
// The improved noise detection will find Cotag.
if (getSignalProperties()->isnoise) {
#ifdef WITH_HITAG
if (readHitagUid()) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Hitag") " found!"); return 1;}
#endif
if (IfPm3Hitag()) {
if (readHitagUid()) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Hitag") " found!"); return 1;}
}
if (readCOTAGUid()) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("COTAG ID") " found!"); return 1;}
PrintAndLogEx(FAILED, "\n" _YELLOW_("No data found!") " - Signal looks like noise. Maybe not an LF tag?");
@ -956,9 +956,7 @@ static command_t CommandTable[] = {
{"fdx", CmdLFFdx, AlwaysAvailable, "{ FDX-B RFIDs... }"},
{"gproxii", CmdLFGuard, AlwaysAvailable, "{ Guardall Prox II RFIDs... }"},
{"hid", CmdLFHID, AlwaysAvailable, "{ HID RFIDs... }"},
#ifdef WITH_HITAG
{"hitag", CmdLFHitag, AlwaysAvailable, "{ Hitag CHIPs... }"},
#endif
{"indala", CmdLFINDALA, AlwaysAvailable, "{ Indala RFIDs... }"},
{"io", CmdLFIO, AlwaysAvailable, "{ ioProx RFIDs... }"},
{"jablotron", CmdLFJablotron, AlwaysAvailable, "{ Jablotron RFIDs... }"},