]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfio.c
adjust hardnested compiler fix to accurate version
[proxmark3-svn] / client / cmdlfio.c
index 1b43d7dd9c0faf4f74910917665803d1d102c727..c71928ece3a88606e79672fa70904b523db498a2 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency ioProx commands
+// FSK2a, rf/64, 64 bits (complete)
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -43,8 +53,9 @@ int CmdFSKdemodIO(const char *Cmd)
   size_t BitLen = getFromGraphBuf(BitStream);
   if (BitLen==0) return 0;
 
+  int waveIdx = 0;
   //get binary from fsk wave
-  idx = IOdemodFSK(BitStream,BitLen);
+  idx = IOdemodFSK(BitStream,BitLen, &waveIdx);
   if (idx<0){
     if (g_debugMode){
       if (idx==-1){
@@ -109,6 +120,8 @@ int CmdFSKdemodIO(const char *Cmd)
 
   PrintAndLog("IO Prox XSF(%02d)%02x:%05d (%08x%08x) [%02x %s]",version,facilitycode,number,code,code2, crc, crcStr);
   setDemodBuf(BitStream,64,idx);
+  setClockGrid(64, waveIdx + (idx*64));
+
   if (g_debugMode){
     PrintAndLog("DEBUG: idx: %d, Len: %d, Printing demod buffer:",idx,64);
     printDemodBuff();
Impressum, Datenschutz