add: "lf t55xx info" option to use data from Graphbuffer.

add:  "lf t55xx trace"  option to use data from Graphbuffer.
This commit is contained in:
iceman1001 2014-10-16 22:25:38 +02:00
commit fbceacc5b8
3 changed files with 71 additions and 41 deletions

View file

@ -116,17 +116,14 @@ int manchester_decode( int * data, const size_t len, uint8_t * dataout){
clock = GetT55x7Clock( data, len, high );
startindex = DetectFirstTransition(data, len, high);
//PrintAndLog(" Clock : %d", clock);
//PrintAndLog(" startindex : %d", startindex);
// PrintAndLog(" Clock : %d", clock);
// PrintAndLog(" startindex : %d", startindex);
if (high != 1)
bitlength = ManchesterConvertFrom255(data, len, bitStream, high, low, clock, startindex);
else
bitlength= ManchesterConvertFrom1(data, len, bitStream, clock, startindex);
//if ( bitlength > 0 )
// PrintPaddedManchester(bitStream, bitlength, clock);
memcpy(dataout, bitStream, bitlength);
return bitlength;
}
@ -558,8 +555,14 @@ void iceFsk3(int * data, const size_t len){
int stopOne = j-1;
int fieldlen = stopOne-startOne;
printf("FIELD Length: %d \n", fieldlen);
fieldlen = (fieldlen == 39 || fieldlen == 41)? 40 : fieldlen;
fieldlen = (fieldlen == 59 || fieldlen == 51)? 50 : fieldlen;
if ( fieldlen != 40 && fieldlen != 50){
printf("Detected field Length: %d \n", fieldlen);
printf("Can only handle len 40 or 50. Aborting...");
return;
}
// FSK sequence start == 000111
int startPos = 0;