return;
}
if (bitLen>512) bitLen=512;
- for (i = 0; i < (bitLen-16); i+=16) {
+ for (i = 0; i <= (bitLen-16); i+=16) {
PrintAndLog("%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i",
BitStream[i],
BitStream[i+1],
}
bitnum=i;
errCnt=manrawdemod(BitStream,&bitnum);
+ if (errCnt>=20){
+ PrintAndLog("Too many errors: %d",errCnt);
+ return 0;
+ }
PrintAndLog("Manchester Decoded - # errors:%d - data:",errCnt);
printBitStream(BitStream,bitnum);
if (errCnt==0){
RepaintGraphWindow();
// Now output the bitstream to the scrollback by line of 16 bits
- if(size > (7*32)+2) size = (7*32)+2; //only output a max of 7 blocks of 32 bits most tags will have full bit stream inside that sample size
+ if(size > (8*32)+2) size = (8*32)+2; //only output a max of 8 blocks of 32 bits most tags will have full bit stream inside that sample size
printBitStream(BitStream,size);
return 0;
}
bitnum=0;
}
errCnt=bestErr;
- if (errCnt<10){
+ if (errCnt<20){
for (i=0; i<bitnum;++i){
BitStream[i]=BitStream2[i];
}
// int invert=0; //invert default
int high = 0, low = 0;
*clk=DetectClock2(BinStream,*bitLen,*clk); //clock default
- uint8_t BitStream[252] = {0};
+ uint8_t BitStream[502] = {0};
if (*clk<8) *clk =64;
if (*clk<32) *clk=32;
}
}
}
- if (bitnum>250) break;
+ if (bitnum>500) break;
}
//we got more than 64 good bits and not all errors
if ((bitnum > (64+errCnt)) && (errCnt<(*bitLen/1000))) {
uint32_t bytebits_to_byte(uint8_t* src, int numbits);
//
-#define MAX_BitStream_LEN (1024*128)
+//#define MAX_BitStream_LEN (1024*128)
//extern int BitStreamLen;
#endif