new grid X offset calcs to fix some issues

also fixed a save_restore issue with grid alignments
now save_restoreGB() saves/restores offset values
added macro enumeration of SAVE vs RESTORE for save_restore commands.
This commit is contained in:
marshmellow42 2017-04-17 18:37:23 -04:00
parent 999d57c201
commit 3fd7fce4ac
8 changed files with 51 additions and 67 deletions

View file

@ -879,25 +879,25 @@ int CheckChipType(char cmdp) {
if (offline || cmdp == '1') return 0;
save_restoreGB(1);
save_restoreDB(1);
save_restoreGB(GRAPH_SAVE);
save_restoreDB(GRAPH_SAVE);
//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);
save_restoreGB(GRAPH_RESTORE);
save_restoreDB(GRAPH_RESTORE);
return 1;
}
//check for t55xx chip...
if (tryDetectP1(true)) {
PrintAndLog("\nValid T55xx Chip Found\nTry lf t55xx ... commands\n");
save_restoreGB(0);
save_restoreDB(0);
save_restoreGB(GRAPH_RESTORE);
save_restoreDB(GRAPH_RESTORE);
return 1;
}
save_restoreGB(0);
save_restoreDB(0);
save_restoreGB(GRAPH_RESTORE);
save_restoreDB(GRAPH_RESTORE);
return 0;
}
@ -1057,7 +1057,7 @@ int CmdLFfind(const char *Cmd)
PrintAndLog("\nNo Known Tags Found!\n");
if (testRaw=='u' || testRaw=='U') {
ans=CheckChipType(cmdp);
//ans=CheckChipType(cmdp);
//test unknown tag formats (raw mode)0
PrintAndLog("\nChecking for Unknown tags:\n");
ans=AutoCorrelate(GraphBuffer, GraphBuffer, GraphTraceLen, 4000, false, false);