]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/graph.c
ADD: tnp3xxx identification in luascripts.
[proxmark3-svn] / client / graph.c
index 3a8f0c3a26079f7fbe793b5f34aad6f81f85884b..a0e85ffd40c8fb367bcc7bb6a443818ae0bfda23 100644 (file)
@@ -155,8 +155,11 @@ void setGraphBuf(uint8_t *buff,int size)
 int getFromGraphBuf(uint8_t *buff)
 {
   uint32_t i;
 int getFromGraphBuf(uint8_t *buff)
 {
   uint32_t i;
-  for (i=0;i<GraphTraceLen;++i)
+  for (i=0;i<GraphTraceLen;++i){
+    if (GraphBuffer[i]>127) GraphBuffer[i]=127; //trim
+    if (GraphBuffer[i]<-127) GraphBuffer[i]=-127; //trim
     buff[i]=(uint8_t)(GraphBuffer[i]+128);
     buff[i]=(uint8_t)(GraphBuffer[i]+128);
+  }
   return i;
 }
 /* Get or auto-detect clock rate */
   return i;
 }
 /* Get or auto-detect clock rate */
Impressum, Datenschutz