chg: use found clock is common

This commit is contained in:
iceman1001 2019-03-19 17:53:42 +01:00
parent 54a1d576ee
commit 8e465d076c

View file

@ -482,13 +482,19 @@ int ASKDemod_ext(const char *Cmd, bool verbose, bool emSearch, uint8_t askType,
int foundclk = 0; int foundclk = 0;
//amplify signal before ST check //amplify signal before ST check
if (amp == 'a') if (amp == 'a') {
askAmp(bits, BitLen); askAmp(bits, BitLen);
}
size_t ststart = 0, stend = 0; size_t ststart = 0, stend = 0;
// if (*stCheck) // if (*stCheck)
bool st = DetectST(bits, &BitLen, &foundclk, &ststart, &stend); bool st = DetectST(bits, &BitLen, &foundclk, &ststart, &stend);
clk = (clk == 0) ? foundclk : clk;
if ( clk == 0 ) {
if ( foundclk == 32 || foundclk == 64 ) {
clk = foundclk;
}
}
if (st) { if (st) {
*stCheck = st; *stCheck = st;