From 181a659bc069ac731aee10f42f0efededdfa7eac Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 22 Feb 2020 13:32:42 +0100 Subject: [PATCH] trying another loop --- armsrc/lfsampling.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/armsrc/lfsampling.c b/armsrc/lfsampling.c index c492a4eda..2e33ec434 100644 --- a/armsrc/lfsampling.c +++ b/armsrc/lfsampling.c @@ -253,11 +253,11 @@ uint32_t DoAcquisition(uint8_t decimation, uint8_t bits_per_sample, bool avg, in uint32_t cancel_counter = 0; int16_t checked = 0; - while (true) { + while (!BUTTON_PRESS()) { // only every 1000th times, in order to save time when collecting samples. if (checked == 1000) { - if (BUTTON_PRESS() || data_available()) { + if (data_available()) { checked = -1; break; } else {