send missing parameters for audio client startup

This commit is contained in:
Jakob Ketterl 2019-05-04 20:40:13 +02:00
parent 1f909080db
commit 6ec21e6716
3 changed files with 6 additions and 4 deletions

View File

@ -25,8 +25,6 @@
<!-- <script type="text/javascript">
//Global variables
var audio_buffering_fill_to=%[AUDIO_BUFSIZE];
var starting_mod="%[START_MOD]";
var starting_offset_frequency = %[START_OFFSET_FREQ];
var server_enable_digimodes=%[DIGIMODES_ENABLE];
var mathbox_waterfall_frequency_resolution=%[MATHBOX_WATERFALL_FRES];
var mathbox_waterfall_history_length=%[MATHBOX_WATERFALL_THIST];

View File

@ -1162,6 +1162,8 @@ function on_ws_recv(evt)
window.waterfall_auto_level_margin = config.waterfall_auto_level_margin;
waterfallColorsDefault();
window.starting_mod = config.start_mod
window.starting_offset_frequency = config.start_offset_frequency;
bandwidth = config.samp_rate;
center_freq = config.shown_center_freq;
fft_size = config.fft_size;

View File

@ -64,9 +64,11 @@ class WebSocketMessageHandler(object):
for key in ["waterfall_colors", "waterfall_min_level", "waterfall_max_level", "waterfall_auto_level_margin",
"shown_center_freq", "samp_rate", "fft_size", "fft_fps", "audio_compression", "fft_compression",
"max_clients"]:
"max_clients", "start_mod"]:
config[key] = pm.getProperty(key).getValue()
config[key] = pm.getPropertyValue(key)
config["start_offset_freq"] = pm.getPropertyValue("start_freq") - pm.getPropertyValue("center_freq")
conn.send({"type":"config","value":config})
print("client connection intitialized")