From 93c1be689ac9fce5420a52a207ecb86a2ba1d732 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 9 May 2020 00:23:46 +0200 Subject: [PATCH] lfsampling: interruptible only when logging not yet triggered --- armsrc/lfsampling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/armsrc/lfsampling.c b/armsrc/lfsampling.c index ae61aa612..9f875cd92 100644 --- a/armsrc/lfsampling.c +++ b/armsrc/lfsampling.c @@ -259,7 +259,8 @@ uint32_t DoAcquisition(uint8_t decimation, uint8_t bits_per_sample, bool avg, in while (!BUTTON_PRESS()) { // only every 1000th times, in order to save time when collecting samples. - if (checked == 1000) { + // interruptible only when logging not yet triggered + if ((checked == 1000) && (trigger_threshold > 0)) { if (data_available()) { checked = -1; break;