mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
update fft only if data available
This commit is contained in:
parent
67774765f5
commit
37e38e9be9
1 changed files with 2 additions and 3 deletions
|
@ -2010,9 +2010,8 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
|
||||||
checkForNewMessageWait = -1;
|
checkForNewMessageWait = -1;
|
||||||
}
|
}
|
||||||
checkForNewMessageWait++;
|
checkForNewMessageWait++;
|
||||||
// update FFT
|
// update FFT only if data available
|
||||||
if (typeof arg.fft !== "undefined") {
|
if (typeof arg.fft !== "undefined" && arg.fft !== "[]") {
|
||||||
// FIXME: WE need to fix this when disabled waterfall chart
|
|
||||||
try {
|
try {
|
||||||
var array = JSON.parse("[" + arg.fft + "]");
|
var array = JSON.parse("[" + arg.fft + "]");
|
||||||
spectrum.addData(array[0]);
|
spectrum.addData(array[0]);
|
||||||
|
|
Loading…
Reference in a new issue