SendCommand(&c);\r
WaitForResponse(CMD_ACK, NULL);\r
\r
-// uint8_t data[LF_TRACE_BUFF_SIZE] = {0x00};\r
+ uint8_t data[LF_TRACE_BUFF_SIZE] = {0x00};\r
\r
- // GetFromBigBuf(data,LF_TRACE_BUFF_SIZE,3560); //3560 -- should be offset..\r
- // WaitForResponseTimeout(CMD_ACK,NULL, 1500);\r
-\r
- // for (int j = 0; j < LF_TRACE_BUFF_SIZE; j++) {\r
- // GraphBuffer[j] = (int)data[j];\r
- // }\r
- // GraphTraceLen = LF_TRACE_BUFF_SIZE;\r
- CmdSamples("12000");\r
+ GetFromBigBuf(data,LF_TRACE_BUFF_SIZE,3560); //3560 -- should be offset..\r
+ WaitForResponseTimeout(CMD_ACK,NULL, 1500);\r
+\r
+ for (int j = 0; j < LF_TRACE_BUFF_SIZE; j++) {\r
+ GraphBuffer[j] = (int)data[j];\r
+ }\r
+ GraphTraceLen = LF_TRACE_BUFF_SIZE;\r
ManchesterDemod(block);\r
- // RepaintGraphWindow();\r
+ RepaintGraphWindow();\r
return 0;\r
}\r
\r
return 0;\r
}\r
}\r
-\r
+ \r
for ( int i = 0; i <8; ++i){\r
memset(s,0,sizeof(s));\r
if ( hasPwd ) {\r
if (!HasGraphData()) return 0;\r
\r
uint8_t sizebyte = 32;\r
+ // the value 5 was selected during empirical studies of the decoded data. Some signal noise to skip.\r
uint8_t offset = 5;\r
uint32_t blockData;\r
uint8_t bits[LF_BITSSTREAM_LEN] = {0x00};\r
\r
int i = start;\r
int j = len-1;\r
+ if (len > 32) {\r
+ return 0;\r
+ }\r
uint32_t tmp = 0;\r
for (; j >= 0; --j, ++i){\r
tmp |= bits[i] << j;\r