]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/iso15693.c
CHG: spelling errors, added help texts in cmdhfmfu.c
[proxmark3-svn] / armsrc / iso15693.c
index 11a499026f39bba79606921da50904ef440a21f4..5af6efb338b6744f23408f074b240e80ea02c82d 100644 (file)
@@ -64,8 +64,7 @@
 #include "string.h"
 #include "../common/iso15693tools.h"
 #include "../common/cmd.h"
 #include "string.h"
 #include "../common/iso15693tools.h"
 #include "../common/cmd.h"
-#include "crapto1.h"
-#include "mifareutil.h"
+
 
 #define arraylen(x) (sizeof(x)/sizeof((x)[0]))
 
 
 #define arraylen(x) (sizeof(x)/sizeof((x)[0]))
 
@@ -470,8 +469,20 @@ static int GetIso15693AnswerFromSniff(uint8_t *receivedResponse, int maxLen, int
                        // every other is Q. We just want power, so abs(I) + abs(Q) is
                        // close to what we want.
                        if (getNext) {
                        // every other is Q. We just want power, so abs(I) + abs(Q) is
                        // close to what we want.
                        if (getNext) {
+                               int8_t r;
 
 
-                               dest[c++] = abs(b) + abs(prev);
+                               if(b < 0) {
+                                       r = -b;
+                               } else {
+                                       r = b;
+                               }
+                               if(prev < 0) {
+                                       r -= prev;
+                               } else {
+                                       r += prev;
+                               }
+
+                               dest[c++] = (uint8_t)r;
 
                                if(c >= 20000) {
                                        break;
 
                                if(c >= 20000) {
                                        break;
@@ -586,7 +597,7 @@ static void BuildIdentifyRequest(void);
 //-----------------------------------------------------------------------------
 void AcquireRawAdcSamplesIso15693(void)
 {
 //-----------------------------------------------------------------------------
 void AcquireRawAdcSamplesIso15693(void)
 {
-       uint8_t *dest =  mifare_get_bigbufptr();
+       uint8_t *dest = (uint8_t *)BigBuf;
 
        int c = 0;
        int getNext = 0;
 
        int c = 0;
        int getNext = 0;
@@ -668,7 +679,7 @@ void AcquireRawAdcSamplesIso15693(void)
 
 void RecordRawAdcSamplesIso15693(void)
 {
 
 void RecordRawAdcSamplesIso15693(void)
 {
-       uint8_t *dest =  mifare_get_bigbufptr();
+       uint8_t *dest =  (uint8_t *)BigBuf;
 
        int c = 0;
        int getNext = 0;
 
        int c = 0;
        int getNext = 0;
Impressum, Datenschutz