detectST has better clock detection. Since 'data raw am' fails but 'data detect a' succeed in finding a clock. Lets see if anything else breaks because of this?

This commit is contained in:
iceman1001 2019-03-19 10:20:10 +01:00
commit ab226c2864

View file

@ -485,14 +485,13 @@ int ASKDemod_ext(const char *Cmd, bool verbose, bool emSearch, uint8_t askType,
if (amp == 'a') if (amp == 'a')
askAmp(bits, BitLen); askAmp(bits, BitLen);
bool st = false;
size_t ststart = 0, stend = 0; size_t ststart = 0, stend = 0;
if (*stCheck) // if (*stCheck)
st = DetectST(bits, &BitLen, &foundclk, &ststart, &stend); bool st = DetectST(bits, &BitLen, &foundclk, &ststart, &stend);
clk = (clk == 0) ? foundclk : clk;
if (st) { if (st) {
*stCheck = st; *stCheck = st;
clk = (clk == 0) ? foundclk : clk;
CursorCPos = ststart; CursorCPos = ststart;
CursorDPos = stend; CursorDPos = stend;
if (verbose) if (verbose)
@ -1607,8 +1606,7 @@ int CmdLoad(const char *Cmd) {
break; break;
} }
if (f) fclose(f);
fclose(f);
PrintAndLogEx(SUCCESS, "loaded %d samples", GraphTraceLen); PrintAndLogEx(SUCCESS, "loaded %d samples", GraphTraceLen);