X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/a9968da347298c146828b97954d135165799659f..2229ee897ec1b2062662da43f7dd8022a9e69fef:/client/cmdlfnoralsy.c diff --git a/client/cmdlfnoralsy.c b/client/cmdlfnoralsy.c index e41dfd9a..b806f292 100644 --- a/client/cmdlfnoralsy.c +++ b/client/cmdlfnoralsy.c @@ -111,17 +111,13 @@ int NoralsyDemod_AM(uint8_t *dest, size_t *size) { int CmdNoralsyDemod(const char *Cmd) { //ASK / Manchester - DemodBufferLen = getFromGraphBuf(DemodBuffer); - if (DemodBufferLen < 255) return 0; - int foundclk = 0; - size_t ststart = 0, stend = 0; - bool st = DetectST_ext(DemodBuffer, &DemodBufferLen, &foundclk, &ststart, &stend); - if (!st) return 0; - - if (!ASKDemod_ext("32 0 0", FALSE, FALSE, 1, &st)) { + bool st = true; + if (!ASKDemod_ext("32 0 0", false, false, 1, &st)) { if (g_debugMode) PrintAndLog("DEBUG: Error - Noralsy: ASK/Manchester Demod failed"); return 0; } + if (!st) return 0; + size_t size = DemodBufferLen; int ans = NoralsyDemod_AM(DemodBuffer, &size); if (ans < 0){ @@ -176,7 +172,7 @@ int CmdNoralsyDemod(const char *Cmd) { int CmdNoralsyRead(const char *Cmd) { CmdLFRead("s"); - getSamples("8000",TRUE); + getSamples("8000",true); return CmdNoralsyDemod(Cmd); }