]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlft55xx.c
align clock grid with demods on graph
[proxmark3-svn] / client / cmdlft55xx.c
index 8ab1892daf715ad18c64a01e0991c64d781c916d..ed8e3152c54c09ea9d8767ada680a9576848279d 100644 (file)
@@ -507,8 +507,8 @@ bool tryDetectModulation(){
        t55xx_conf_block_t tests[15];\r
        int bitRate=0;\r
        uint8_t fc1 = 0, fc2 = 0, ans = 0;\r
-       int clk=0;\r
-       ans = fskClocks(&fc1, &fc2, (uint8_t *)&clk, false);\r
+       int clk = 0, firstClockEdge = 0;\r
+       ans = fskClocks(&fc1, &fc2, (uint8_t *)&clk, false, &firstClockEdge);\r
        if (ans && ((fc1==10 && fc2==8) || (fc1==8 && fc2==5))) {\r
                if ( FSKrawDemod("0 0", false) && test(DEMOD_FSK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
                        tests[hits].modulation = DEMOD_FSK;\r
@@ -1555,7 +1555,7 @@ bool tryDetectP1(bool getData) {
        uint8_t preamble[] = {1,1,1,0,0,0,0,0,0,0,0,1,0,1,0,1};\r
        size_t startIdx = 0;\r
        uint8_t fc1 = 0, fc2 = 0, ans = 0;\r
-       int clk = 0;\r
+       int clk = 0, firstClockEdge = 0;\r
        bool st = true;\r
 \r
        if ( getData ) {\r
@@ -1564,7 +1564,7 @@ bool tryDetectP1(bool getData) {
        }\r
 \r
        // try fsk clock detect. if successful it cannot be any other type of modulation...  (in theory...)\r
-       ans = fskClocks(&fc1, &fc2, (uint8_t *)&clk, false);\r
+       ans = fskClocks(&fc1, &fc2, (uint8_t *)&clk, false, &firstClockEdge);\r
        if (ans && ((fc1==10 && fc2==8) || (fc1==8 && fc2==5))) {\r
                if ( FSKrawDemod("0 0", false) && \r
                          preambleSearchEx(DemodBuffer,preamble,sizeof(preamble),&DemodBufferLen,&startIdx,false) && \r
Impressum, Datenschutz