mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
set wrong audio level just once
This commit is contained in:
parent
efae8fe06e
commit
e041772bb3
1 changed files with 7 additions and 4 deletions
|
@ -30,7 +30,7 @@ const split_char = "0;1;";
|
||||||
|
|
||||||
// global to keep track of Modem connection error emissions
|
// global to keep track of Modem connection error emissions
|
||||||
var modemShowConnectStateError = 1;
|
var modemShowConnectStateError = 1;
|
||||||
|
var setTxAudioLevelOnce = true
|
||||||
// network connection Timeout
|
// network connection Timeout
|
||||||
setTimeout(connectModem, 2000);
|
setTimeout(connectModem, 2000);
|
||||||
|
|
||||||
|
@ -172,13 +172,16 @@ client.on("data", function (socketdata) {
|
||||||
stateStore.mode = data["mode"];
|
stateStore.mode = data["mode"];
|
||||||
stateStore.bandwidth = data["bandwidth"];
|
stateStore.bandwidth = data["bandwidth"];
|
||||||
stateStore.tx_audio_level = data["audio_level"];
|
stateStore.tx_audio_level = data["audio_level"];
|
||||||
|
|
||||||
// if audio level is different from config one, send new audio level to modem
|
// if audio level is different from config one, send new audio level to modem
|
||||||
|
//console.log(parseInt(stateStore.tx_audio_level))
|
||||||
|
//console.log(parseInt(settings.tx_audio_level))
|
||||||
if (
|
if (
|
||||||
parseInt(stateStore.tx_audio_level) !==
|
parseInt(stateStore.tx_audio_level) !==
|
||||||
parseInt(settings.tx_audio_level)
|
parseInt(settings.tx_audio_level) &&
|
||||||
|
setTxAudioLevelOnce === true
|
||||||
) {
|
) {
|
||||||
setTxAudioLevel(settings.tx_audio_level);
|
setTxAudioLevelOnce = false
|
||||||
|
setTxAudioLevel(settings.tx_audio_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
stateStore.dbfs_level = data["audio_dbfs"];
|
stateStore.dbfs_level = data["audio_dbfs"];
|
||||||
|
|
Loading…
Reference in a new issue