From 6203bdc33f12a3b469b5107c9a0a788555286ef0 Mon Sep 17 00:00:00 2001 From: Egor Shitikov Date: Sat, 14 Sep 2024 19:30:51 -0700 Subject: [PATCH] add comment --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 88f76bc..45c1419 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -960,7 +960,8 @@ void loop(void) // avoid buffer overflow if (result_index < RADIOLIB_SX126X_SPECTRAL_SCAN_RES_SIZE) { - // Saving max value only rss is negative so smaller is bigger + // Saving max ABS value of rssi. dB is negative so smaller is + // bigger if (result[result_index] == 0 || result[result_index] > abs(rssi)) { result[result_index] = abs(rssi);