]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/graph.c
add check for no wave in graphbuffer prior to...
[proxmark3-svn] / client / graph.c
index 319cde39217791bd3cc0a909aa228a8241509d96..ab10a446cd8f04af8e0e49459b63b2a917126c49 100644 (file)
@@ -268,3 +268,13 @@ uint8_t fskClocks(uint8_t *fc1, uint8_t *fc2, uint8_t *rf1, bool verbose)
        }
        return 1;
 }
+bool graphJustNoise(int *BitStream, int size)
+{
+       static const uint8_t THRESHOLD = 10; //might not be high enough for noisy environments
+       //test samples are not just noise
+       bool justNoise1 = 1;
+       for(int idx=0; idx < size && justNoise1 ;idx++){
+               justNoise1 = BitStream[idx] < THRESHOLD;
+       }
+       return justNoise1;
+}
Impressum, Datenschutz