finish FSK graph index changes

This commit is contained in:
marshmellow42 2017-04-15 16:18:54 -04:00
parent b760f0ffd8
commit 1c70664ae7
9 changed files with 47 additions and 40 deletions

View file

@ -53,8 +53,9 @@ int CmdFSKdemodIO(const char *Cmd)
size_t BitLen = getFromGraphBuf(BitStream);
if (BitLen==0) return 0;
int waveIdx = 0;
//get binary from fsk wave
idx = IOdemodFSK(BitStream,BitLen);
idx = IOdemodFSK(BitStream,BitLen, &waveIdx);
if (idx<0){
if (g_debugMode){
if (idx==-1){
@ -119,7 +120,7 @@ int CmdFSKdemodIO(const char *Cmd)
PrintAndLog("IO Prox XSF(%02d)%02x:%05d (%08x%08x) [%02x %s]",version,facilitycode,number,code,code2, crc, crcStr);
setDemodBuf(BitStream,64,idx);
setClockGrid(g_DemodClock, g_DemodStartIdx + (idx*g_DemodClock));
setClockGrid(64, waveIdx + (idx*64));
if (g_debugMode){
PrintAndLog("DEBUG: idx: %d, Len: %d, Printing demod buffer:",idx,64);