From: marshmellow42 Date: Tue, 13 Jan 2015 21:02:23 +0000 (-0500) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: v2.0.0-rc1~47^2^2~2 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/ae6ead3dc84acd074be24c0da5efd94ea7a0b225?hp=4e3d8d0f764823d3550970d6d686a86e8f04d8af Merge remote-tracking branch 'upstream/master' Conflicts: client/cmdlf.c --- diff --git a/client/cmddata.c b/client/cmddata.c index 6bc66f06..ed0a0758 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -870,8 +870,12 @@ int PSKnrzDemod(const char *Cmd){ // optional arguments - same as CmdpskNRZrawDemod (clock & invert) int CmdIndalaDecode(const char *Cmd) { + int ans; + if (strlen(Cmd)>0) + ans=PSKnrzDemod(Cmd); + else + ans=PSKnrzDemod("32"); - int ans=PSKnrzDemod(Cmd); if (ans < 0){ PrintAndLog("Error1: %d",ans); return 0; diff --git a/common/lfdemod.c b/common/lfdemod.c index 25e52552..11ad1403 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -300,7 +300,7 @@ int askrawdemod(uint8_t *BinStream, size_t *size, int *clk, int *invert) else if (BinStream[i] < low) low = BinStream[i]; } - if ((high < 158)){ //throw away static + if ((high < 134)){ //throw away static high has to be more than 6 on graph. noise <= -10 here // PrintAndLog("no data found"); return -2; } @@ -407,21 +407,11 @@ size_t fsk_wave_demod(uint8_t * dest, size_t size, uint8_t fchigh, uint8_t fclow { uint32_t last_transition = 0; uint32_t idx = 1; - uint32_t maxVal=0; + //uint32_t maxVal=0; if (fchigh==0) fchigh=10; if (fclow==0) fclow=8; - // we do care about the actual theshold value as sometimes near the center of the - // wave we may get static that changes direction of wave for one value - // if our value is too low it might affect the read. and if our tag or - // antenna is weak a setting too high might not see anything. [marshmellow] - if (size<100) return 0; - for(idx=1; idx<100; idx++){ - if(maxVal