mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-25 16:45:09 +08:00
clock can be negative
This commit is contained in:
parent
e444640068
commit
555d970c7d
1 changed files with 4 additions and 1 deletions
|
@ -247,7 +247,10 @@ int GetPskClock(const char *str, bool printAns) {
|
||||||
size_t firstPhaseShiftLoc = 0;
|
size_t firstPhaseShiftLoc = 0;
|
||||||
uint8_t curPhase = 0, fc = 0;
|
uint8_t curPhase = 0, fc = 0;
|
||||||
clock1 = DetectPSKClock(bits, size, 0, &firstPhaseShiftLoc, &curPhase, &fc);
|
clock1 = DetectPSKClock(bits, size, 0, &firstPhaseShiftLoc, &curPhase, &fc);
|
||||||
setClockGrid(clock1, firstPhaseShiftLoc);
|
|
||||||
|
if (clock1 >= 0)
|
||||||
|
setClockGrid(clock1, firstPhaseShiftLoc);
|
||||||
|
|
||||||
// Only print this message if we're not looping something
|
// Only print this message if we're not looping something
|
||||||
if (printAns)
|
if (printAns)
|
||||||
PrintAndLogEx(SUCCESS, "Auto-detected clock rate: %d", clock1);
|
PrintAndLogEx(SUCCESS, "Auto-detected clock rate: %d", clock1);
|
||||||
|
|
Loading…
Reference in a new issue