Skip to content

Commit

Permalink
Avoid rescanning detected signal parts.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Dec 30, 2022
1 parent e921036 commit 8062fb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ void scan_for_signal(ProtoViewApp *app) {
12 samples it's very easy to mistake
noise for signal. */

for (uint32_t i = 0; i < copy->total-1; i++) {
uint32_t i = 0;
while (i < copy->total-1) {
uint32_t thislen = search_coherent_signal(copy,i);
if (thislen > minlen && thislen > app->signal_bestlen) {
app->signal_bestlen = thislen;
Expand All @@ -171,6 +172,7 @@ void scan_for_signal(ProtoViewApp *app) {
FURI_LOG_E(TAG, "Displayed sample updated (%d samples)",
(int)thislen);
}
i += thislen ? thislen : 1;
}
raw_samples_free(copy);
}
Expand Down

0 comments on commit 8062fb0

Please sign in to comment.