This commit is contained in:
John Flinchbaugh
2025-01-08 08:25:17 -05:00
parent 87c354a2ee
commit f75f65f6c2

View File

@@ -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)
{