]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
adjust lf search to not use save/restore if...
authormarshmellow42 <marshmellowrf@gmail.com>
Sun, 16 Apr 2017 01:40:05 +0000 (21:40 -0400)
committermarshmellow42 <marshmellowrf@gmail.com>
Sun, 16 Apr 2017 01:40:05 +0000 (21:40 -0400)
offline or '1' entered
this allows the graph restore button to continue functioning after a `lf
search 1`

client/cmdlf.c

index 5c479ae0ba59d74f9831417fa752e777959cd713..b18cf21583a72abfef9d62f70824808731e9226a 100644 (file)
@@ -877,19 +877,20 @@ int CmdVchDemod(const char *Cmd)
 int CheckChipType(char cmdp) {
        uint32_t wordData = 0;
 
 int CheckChipType(char cmdp) {
        uint32_t wordData = 0;
 
-       //check for em4x05/em4x69 chips first
+       if (offline || cmdp == '1') return 0;
+
        save_restoreGB(1);
        save_restoreDB(1);
        save_restoreGB(1);
        save_restoreDB(1);
-       if ((!offline && (cmdp != '1')) && EM4x05Block0Test(&wordData)) {
+       //check for em4x05/em4x69 chips first
+       if (EM4x05Block0Test(&wordData)) {
                PrintAndLog("\nValid EM4x05/EM4x69 Chip Found\nTry lf em 4x05... commands\n");
                save_restoreGB(0);
                save_restoreDB(0);
                return 1;
        }
 
                PrintAndLog("\nValid EM4x05/EM4x69 Chip Found\nTry lf em 4x05... commands\n");
                save_restoreGB(0);
                save_restoreDB(0);
                return 1;
        }
 
-       //TODO check for t55xx chip...
-
-       if ((!offline && (cmdp != '1')) && tryDetectP1(true)) {
+       //check for t55xx chip...
+       if (tryDetectP1(true)) {
                PrintAndLog("\nValid T55xx Chip Found\nTry lf t55xx ... commands\n");
                save_restoreGB(0);
                save_restoreDB(0);
                PrintAndLog("\nValid T55xx Chip Found\nTry lf t55xx ... commands\n");
                save_restoreGB(0);
                save_restoreDB(0);
Impressum, Datenschutz