From a9fbe7186418d8a96247b99b344c380af0a3c10a Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Fri, 29 Mar 2024 19:26:54 -0400 Subject: [PATCH] Don't update scan chart data until there's actual data --- auto_rx/autorx/templates/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/auto_rx/autorx/templates/index.html b/auto_rx/autorx/templates/index.html index d8c574e..8b4b2be 100644 --- a/auto_rx/autorx/templates/index.html +++ b/auto_rx/autorx/templates/index.html @@ -197,6 +197,10 @@ // There is Scan data ready for us! // Grab the latest set of data. $.getJSON("get_scan_data", function(data){ + if (data.freq.length == 0) { + return; + } + // Load the data into our data stores. scan_chart_spectra.columns[0] = ['x_spectra'].concat(data.freq); scan_chart_spectra.columns[1] = ['Spectra'].concat(data.power);