Skip to content

Commit

Permalink
Reset sample history when OK is pressed.
Browse files Browse the repository at this point in the history
Otherwise there is a window of time where the signal
is still inside the buffer and gets re-detected.
  • Loading branch information
antirez committed Dec 29, 2022
1 parent 860879e commit 863dc84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ int32_t protoview_app_entry(void* p) {
} else if (input.key == InputKeyOk) {
app->signal_bestlen = 0;
raw_samples_reset(DetectedSamples);
raw_samples_reset(RawSamples);
} else if (input.key == InputKeyDown) {
if (app->us_scale < 500) app->us_scale += scale_step;
} else if (input.key == InputKeyUp) {
Expand Down

0 comments on commit 863dc84

Please sign in to comment.