From c32051054a058ebb8f8d6f0da3c3368f46a36447 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Thu, 26 Oct 2023 12:34:42 +0000 Subject: [PATCH] [CodeFactor] Apply fixes to commit e041772 --- gui/src/js/sock.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/src/js/sock.js b/gui/src/js/sock.js index f596fcd6..da354cac 100644 --- a/gui/src/js/sock.js +++ b/gui/src/js/sock.js @@ -30,7 +30,7 @@ const split_char = "0;1;"; // global to keep track of Modem connection error emissions var modemShowConnectStateError = 1; -var setTxAudioLevelOnce = true +var setTxAudioLevelOnce = true; // network connection Timeout setTimeout(connectModem, 2000); @@ -177,11 +177,11 @@ client.on("data", function (socketdata) { //console.log(parseInt(settings.tx_audio_level)) if ( parseInt(stateStore.tx_audio_level) !== - parseInt(settings.tx_audio_level) && + parseInt(settings.tx_audio_level) && setTxAudioLevelOnce === true ) { - setTxAudioLevelOnce = false - setTxAudioLevel(settings.tx_audio_level); + setTxAudioLevelOnce = false; + setTxAudioLevel(settings.tx_audio_level); } stateStore.dbfs_level = data["audio_dbfs"];