Просмотр исходного кода

Reset sample history when OK is pressed.

Otherwise there is a window of time where the signal
is still inside the buffer and gets re-detected.
antirez 3 лет назад
Родитель
Сommit
863dc844d6
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      app.c

+ 1 - 0
app.c

@@ -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) {