From 8e465d076cda98c9a193bcb12e285c8a1311d791 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 19 Mar 2019 17:53:42 +0100 Subject: [PATCH] chg: use found clock is common --- client/cmddata.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/client/cmddata.c b/client/cmddata.c index b50d44649..72cab3755 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -482,13 +482,19 @@ int ASKDemod_ext(const char *Cmd, bool verbose, bool emSearch, uint8_t askType, int foundclk = 0; //amplify signal before ST check - if (amp == 'a') + if (amp == 'a') { askAmp(bits, BitLen); - + } + size_t ststart = 0, stend = 0; // if (*stCheck) 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) { *stCheck = st;