From f75f65f6c28f28548ceccdbe84ebe9b44e033320 Mon Sep 17 00:00:00 2001 From: John Flinchbaugh Date: Wed, 8 Jan 2025 08:25:17 -0500 Subject: [PATCH] comments --- app/spectrum.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/spectrum.c b/app/spectrum.c index b1b4826..602e06c 100644 --- a/app/spectrum.c +++ b/app/spectrum.c @@ -871,8 +871,11 @@ uint8_t Rssi2Y(uint16_t rssi) static void DrawSpectrum() { uint16_t steps = GetStepsCount(); + // for larger numbers of samples, max at 128 to correctly draw uint8_t bars = (steps > 128) ? 128 : steps; - uint8_t shift_graph = 64 / steps + 1; // to center bar on freq marker + // to center bar on freq marker + uint8_t shift_graph = 64 / steps + 1; + uint8_t ox = 0; for (uint8_t i = 0; i < 128; ++i) {