]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
clean up some comments 48/head
authormarshmellow42 <marshmellowrf@gmail.com>
Mon, 26 Jan 2015 22:49:30 +0000 (17:49 -0500)
committermarshmellow42 <marshmellowrf@gmail.com>
Mon, 26 Jan 2015 22:49:30 +0000 (17:49 -0500)
client/cmddata.c
common/lfdemod.c

index 0c6cd72c2623ca6157bc9a3d05d911265a0f9297..9ed228a440948a1984e66712d9b36edfff937e6a 100644 (file)
@@ -1190,12 +1190,17 @@ int CmdFSKfcDetect(const char *Cmd)
   return 1;
 }
 
+//by marshmellow
+//attempt to detect the bit clock for PSK or NRZ modulations
 int CmdDetectNRZpskClockRate(const char *Cmd)
 {
        GetNRZpskClock("",0,0);
        return 0;
 }
 
+//by marshmellow
+//attempt to psk1 or nrz demod graph buffer
+//NOTE CURRENTLY RELIES ON PEAKS :(
 int PSKnrzDemod(const char *Cmd, uint8_t verbose)
 {
        int invert=0;
@@ -1296,6 +1301,9 @@ int CmdIndalaDecode(const char *Cmd)
        return 1;
 }
 
+//by marshmellow
+//attempt to clean psk wave noise after a peak 
+//NOTE RELIES ON PEAKS :(
 int CmdPskClean(const char *Cmd)
 {
        uint8_t bitStream[MAX_GRAPH_TRACE_LEN]={0};
index 810e0357bd77873c8e6b182ef0e66194abe10139..1b499158b09c025b7784b07d1c694e98a27d2de7 100644 (file)
@@ -336,30 +336,20 @@ int askrawdemod(uint8_t *BinStream, size_t *size, int *clk, int *invert)
                        for (i = iii; i < *size; ++i) {
                                if ((BinStream[i] >= high) && ((i-lastBit)>(*clk-tol))){
                                        lastBit+=*clk;
-                                       //BitStream[bitnum] = *invert;
-                                       //bitnum++;
                                        midBit=0;
                                } else if ((BinStream[i] <= low) && ((i-lastBit)>(*clk-tol))){
                                        //low found and we are expecting a bar
                                        lastBit+=*clk;
-                                       //BitStream[bitnum] = 1- *invert;
-                                       //bitnum++;
                                        midBit=0;
                                } else if ((BinStream[i]<=low) && (midBit==0) && ((i-lastBit)>((*clk/2)-tol))){
                                        //mid bar?
                                        midBit=1;
-                                       //BitStream[bitnum]= 1- *invert;
-                                       //bitnum++;
                                } else if ((BinStream[i]>=high) && (midBit==0) && ((i-lastBit)>((*clk/2)-tol))){
                                        //mid bar?
                                        midBit=1;
-                                       //BitStream[bitnum]= *invert;
-                                       //bitnum++;
                                } else if ((i-lastBit)>((*clk/2)+tol) && (midBit==0)){
                                        //no mid bar found
                                        midBit=1;
-                                       //BitStream[bitnum]= BitStream[bitnum-1];
-                                       //bitnum++;
                                } else {
                                        //mid value found or no bar supposed to be here
 
@@ -367,16 +357,11 @@ int askrawdemod(uint8_t *BinStream, size_t *size, int *clk, int *invert)
                                                //should have hit a high or low based on clock!!
                                                //debug
                                                //PrintAndLog("DEBUG - no wave in expected area - location: %d, expected: %d-%d, lastBit: %d - resetting search",i,(lastBit+(clk-((int)(tol)))),(lastBit+(clk+((int)(tol)))),lastBit);
-                                               //if (bitnum > 0){
-                                               //      BitStream[bitnum]=77;
-                                               //      bitnum++;
-                                               //}
 
                                                errCnt++;
                                                lastBit+=*clk;//skip over until hit too many errors
                                                if (errCnt > ((*size/1000))){  //allow 1 error for every 1000 samples else start over
                                                        errCnt=0;
-                                                       //      bitnum=0;//start over
                                                        break;
                                                }
                                        }
Impressum, Datenschutz