From dbcccc4ae826dfbbe7eea0089670008e43dfe729 Mon Sep 17 00:00:00 2001 From: Egor Shitikov Date: Wed, 21 Aug 2024 18:03:36 -0700 Subject: [PATCH] samples 30 --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e1e76e5..d93f038 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -186,7 +186,7 @@ constexpr bool DRAW_DETECTION_TICKS = true; // Number of samples for each frequency scan. Fewer samples = better temporal resolution. // if more than 100 it can freez -#define SAMPLES 60 //(scan time = 1294) +#define SAMPLES 35 //(scan time = 1294) // number of samples for RSSI method #define SAMPLES_RSSI 20 // 21 // @@ -874,7 +874,7 @@ void loop(void) { // do not process 'first' and 'last' row to avoid out of index // access - if ((y != 0) && (y != (RADIOLIB_SX126X_SPECTRAL_SCAN_RES_SIZE - 3))) + if ((y > 0) && (y != (RADIOLIB_SX126X_SPECTRAL_SCAN_RES_SIZE - 3))) { if (((result[y + 1] != 0) && (result[y + 2] != 0)) || (result[y - 1] != 0))