uint8_t DemodBuffer[MAX_DEMOD_BUF_LEN];
uint8_t g_debugMode=0;
size_t DemodBufferLen=0;
+int g_DemodStartIdx=0;
+int g_DemodClock=0;
static int CmdHelp(const char *Cmd);
return 0;
}
if (verbose || g_debugMode) PrintAndLog("\nUsing Clock:%d, Invert:%d, Bits Found:%d",clk,invert,BitLen);
-
//output
setDemodBuf(BitStream,BitLen,0);
setClockGrid(clk, startIdx);
}
bool st = true;
if (Cmd[0]=='s')
- return ASKDemod_ext(Cmd++, true, true, 1, &st);
+ return ASKDemod_ext(Cmd++, true, false, 1, &st);
else if (Cmd[1] == 's')
- return ASKDemod_ext(Cmd+=2, true, true, 1, &st);
+ return ASKDemod_ext(Cmd+=2, true, false, 1, &st);
else
- return ASKDemod(Cmd, true, true, 1);
+ return ASKDemod(Cmd, true, false, 1);
}
//by marshmellow
if (size > 0) {
setDemodBuf(BitStream,size,0);
setClockGrid(rfLen, startIdx);
-
+
// Now output the bitstream to the scrollback by line of 16 bits
if (verbose || g_debugMode) {
PrintAndLog("\nUsing Clock:%u, invert:%u, fchigh:%u, fclow:%u", (unsigned int)rfLen, (unsigned int)invert, (unsigned int)fchigh, (unsigned int)fclow);
}
void setClockGrid(int clk, int offset) {
+ g_DemodStartIdx = offset;
+ g_DemodClock = clk;
+ PrintAndLog("demodoffset %d, clk %d",offset,clk);
if (offset > clk) offset %= clk;
if (offset < 0) offset += clk;
GraphTraceLen = n;
}
+ setClockGrid(0,0);
RepaintGraphWindow();
return 0;
}
}
fclose(f);
PrintAndLog("loaded %d samples", GraphTraceLen);
+ setClockGrid(0,0);
RepaintGraphWindow();
return 0;
}