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 = false;
+ 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){
int CmdNoralsyRead(const char *Cmd) {
CmdLFRead("s");
- getSamples("8000",TRUE);
+ getSamples("8000",true);
return CmdNoralsyDemod(Cmd);
}