mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Add a minimum clock threshold.
This commit is contained in:
@@ -25,6 +25,11 @@ static DoubleFlag clockIntervalBias(
|
||||
"Adjust intervals between pulses by this many clocks before decoding.",
|
||||
-0.02);
|
||||
|
||||
static DoubleFlag minimumClockUs(
|
||||
{ "--minimum-clock-us" },
|
||||
"Refuse to detect clocks shorter than this, to avoid false positives.",
|
||||
0.75);
|
||||
|
||||
int FluxmapReader::readOpcode(unsigned& ticks)
|
||||
{
|
||||
ticks = 0;
|
||||
@@ -222,7 +227,9 @@ nanoseconds_t FluxmapReader::seekToPattern(const FluxMatcher& pattern, const Flu
|
||||
seek(positions[intervalCount-match.intervals]);
|
||||
_pos.zeroes = match.zeroes;
|
||||
matching = match.matcher;
|
||||
return match.clock * NS_PER_TICK;
|
||||
nanoseconds_t detectedClock = match.clock * NS_PER_TICK;
|
||||
if (detectedClock > (minimumClockUs*1000))
|
||||
return match.clock * NS_PER_TICK;
|
||||
}
|
||||
|
||||
for (unsigned i=0; i<intervalCount; i++)
|
||||
|
||||
Reference in New Issue
Block a user