}
}
+void SetGraphClock( int clock, int startidx){
+ PlotClock = clock;
+ PlockClockStartIndex = startidx;
+}
+
// Get or auto-detect ask clock rate
int GetAskClock(const char str[], bool printAns, bool verbose)
{
// Only print this message if we're not looping something
if (printAns)
PrintAndLog("Auto-detected clock rate: %d, Best Starting Position: %d", clock, start);
+ SetGraphClock(clock, start);
return clock;
}
}
return 0;
}
-void SetGraphClock( int clock, int startidx){
- PlotClock = clock;
- PlockClockStartIndex = startidx;
-}
// by marshmellow
// not perfect especially with lower clocks or VERY good antennas (heavy wave clipping)
if (g_debugMode == 2) prnt("DEBUG ASK: clk %d, err %d, startpos %d, endpos %d", clk[clkCnt], errCnt, ii, i);
if (errCnt==0 && clkCnt<7) {
if (!clockFnd) *clock = clk[clkCnt];
-
- SetGraphClock(*clock, ii);
return ii;
}
//if we found errors see if it is lowest so far and save it as best run
}
if (!clockFnd) *clock = clk[best];
- SetGraphClock(*clock, bestStart[best]);
return bestStart[best];
}