X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/d3a22c7dfa87bf5e21d228849a602194be4a0895..3de045905f901cc0d1ea49738c7d290a3acda541:/armsrc/iso15693.c diff --git a/armsrc/iso15693.c b/armsrc/iso15693.c index c4f5f612..5af6efb3 100644 --- a/armsrc/iso15693.c +++ b/armsrc/iso15693.c @@ -64,8 +64,7 @@ #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])) @@ -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) { + int8_t r; + + if(b < 0) { + r = -b; + } else { + r = b; + } + if(prev < 0) { + r -= prev; + } else { + r += prev; + } - dest[c++] = abs(b) + abs(prev); + dest[c++] = (uint8_t)r; if(c >= 20000) { break;