if (Em410xDecode(BitStream, &BitLen, &idx, hi, lo)) {
//set GraphBuffer for clone or sim command
setDemodBuf(DemodBuffer, (BitLen==40) ? 64 : 128, idx+1);
- g_DemodStartIdx += (idx+1)*g_DemodClock;
+ setClockGrid(g_DemodClock, g_DemodStartIdx + ((idx+1)*g_DemodClock));
+
if (g_debugMode) {
PrintAndLog("DEBUG: idx: %d, Len: %d, Printing Demod Buffer:", idx, BitLen);
printDemodBuff();
}
setDemodBuf(DemodBuffer, 32, 0);
+ //setClockGrid(0,0);
+
*word = bytebits_to_byteLSBF(DemodBuffer, 32);
}
return true;