]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfviking.c
fix 'hf iclass sim':
[proxmark3-svn] / client / cmdlfviking.c
index 3d525c1c9787bc1bcd421962aad0f3036e954673..73a9126af568904dab306d19ccf217bf44bf052b 100644 (file)
@@ -7,11 +7,13 @@
 // Low frequency Viking tag commands (AKA FDI Matalec Transit)
 // ASK/Manchester, RF/32, 64 bits (complete)
 //-----------------------------------------------------------------------------
 // Low frequency Viking tag commands (AKA FDI Matalec Transit)
 // ASK/Manchester, RF/32, 64 bits (complete)
 //-----------------------------------------------------------------------------
+
+#include "cmdlfviking.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
-#include "proxmark3.h"
-#include "cmdlfviking.h"
+#include "comms.h"
 #include "ui.h"
 #include "util.h"
 #include "graph.h"
 #include "ui.h"
 #include "util.h"
 #include "graph.h"
@@ -73,7 +75,8 @@ int CmdVikingDemod(const char *Cmd) {
        uint8_t  checksum = bytebits_to_byte(DemodBuffer+ans+32+24, 8);
        PrintAndLog("Viking Tag Found: Card ID %08X, Checksum: %02X", cardid, (unsigned int) checksum);
        PrintAndLog("Raw: %08X%08X", raw1,raw2);
        uint8_t  checksum = bytebits_to_byte(DemodBuffer+ans+32+24, 8);
        PrintAndLog("Viking Tag Found: Card ID %08X, Checksum: %02X", cardid, (unsigned int) checksum);
        PrintAndLog("Raw: %08X%08X", raw1,raw2);
-       setDemodBuf(DemodBuffer+ans, 64, 0);
+       setDemodBuf(DemodBuffer, 64, ans);
+       setClockGrid(g_DemodClock, g_DemodStartIdx + (ans*g_DemodClock));
        return 1;
 }
 
        return 1;
 }
 
Impressum, Datenschutz