]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfindala.c
Merge pull request #355 from pwpiwi/io_fix
[proxmark3-svn] / client / cmdlfindala.c
index 8cb5f63d131cae415de77982d636d708d92d9e08..8ec04cbb7ef4e4bc1ab88754b70373390a9774fd 100644 (file)
@@ -5,6 +5,7 @@
 // the license.
 //-----------------------------------------------------------------------------
 // Low frequency Indala commands
+// PSK1, rf/32, 64 or 224 bits (known)
 //-----------------------------------------------------------------------------
 
 #include <stdio.h>
@@ -45,6 +46,7 @@ int CmdIndalaDecode(const char *Cmd) {
                return -1;
        }
        setDemodBuf(DemodBuffer, size, (size_t)startIdx);
+       setClockGrid(g_DemodClock, g_DemodStartIdx + (startIdx*g_DemodClock));
        if (invert)
                if (g_debugMode)
                        PrintAndLog("Had to invert bits");
@@ -73,8 +75,7 @@ int CmdIndalaDecode(const char *Cmd) {
 }
 
 int CmdIndalaRead(const char *Cmd) {
-       CmdLFRead("s");
-       getSamples("30000",false);
+       lf_read(true, 30000);
        return CmdIndalaDecode("");
 }
 
@@ -95,8 +96,12 @@ int CmdIndalaDemod(const char *Cmd) {
        uint8_t rawbits[4096];
        int rawbit = 0;
        int worst = 0, worstPos = 0;
-       // PrintAndLog("Expecting a bit less than %d raw bits", GraphTraceLen / 32);
+
+       //clear clock grid and demod plot
+       setClockGrid(0, 0);
+       DemodBufferLen = 0;
        
+       // PrintAndLog("Expecting a bit less than %d raw bits", GraphTraceLen / 32);
        // loop through raw signal - since we know it is psk1 rf/32 fc/2 skip every other value (+=2)
        for (i = 0; i < GraphTraceLen-1; i += 2) {
                count += 1;
Impressum, Datenschutz