From d5c9e33e68edfb49b0719aa0daf7dcfc06f18fd0 Mon Sep 17 00:00:00 2001 From: Steve AB7PA <69524416+ab7pa@users.noreply.github.com> Date: Tue, 6 Apr 2021 19:18:00 -0700 Subject: [PATCH] bug: Fix spike to zero in SNR Chart (#90) Fix spike to zero in SNR Chart. --- files/www/cgi-bin/api | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/www/cgi-bin/api b/files/www/cgi-bin/api index 22b8cf83..11a2960f 100755 --- a/files/www/cgi-bin/api +++ b/files/www/cgi-bin/api @@ -146,15 +146,15 @@ function getSignal(realtime) -- snrlog sometimes has the string "null" for signal/noise, if so then assume they are zero if signal_dbm=="null" then - signal_dbm = 0 + signal_dbm = -95 end if noise_dbm=="null" then - noise_dbm = 0 + noise_dbm = -95 end -- signal and noise might also be nil, so convert them to numbers - signal_dbm = tonumber(signal_dbm or 0) - noise_dbm = tonumber(noise_dbm or 0) + signal_dbm = tonumber(signal_dbm or -95) + noise_dbm = tonumber(noise_dbm or -95) --snrlog sometimes has -1 for mcs indices, if so then make them undefined if tx_rate_mcs_index == -1 or tx_rate_mcs_index == "-1" then