Added cfg.fft_max_seen

This commit is contained in:
ha7ilm 2015-12-09 07:04:18 +01:00
parent fbfccf26a6
commit 7c0afcd270
4 changed files with 6 additions and 2 deletions

View file

@ -66,6 +66,7 @@ sdrhu_public_listing = False
dsp_plugin="csdr"
fft_fps=9
fft_size=4096
#samp_rate = 2048000
samp_rate = 250000
@ -112,5 +113,7 @@ client_audio_buffer_size = 5
start_freq = center_freq
start_mod = "nfm" #nfm, am, lsb, usb, cw
fft_max_seen=0 # N*200 pixels vertically. Set 0 to never clear on-screen history.
iq_server_port = 4951
# (if ncat is not available on your system, rtl_mus will be used, thus you will have to set the same port as "my_listening_port" in config_rtl.py as well)

View file

@ -30,6 +30,7 @@
var audio_buffering_fill_to=%[AUDIO_BUFSIZE];
var starting_mod = "%[START_MOD]";
var starting_offset_frequency = %[START_OFFSET_FREQ];
var fft_max_seen = %[FFT_MAX_SEEN];
</script>
<script src="sdr.js"></script>
<script src="openwebrx.js"></script>

View file

@ -1564,6 +1564,7 @@ function add_canvas()
new_canvas.addEventListener("mousedown", canvas_mousedown, false);
new_canvas.addEventListener("wheel",canvas_mousewheel, false);
canvases.push(new_canvas);
if(fft_max_seen && canvases.length>fft_max_seen) canvas_container.removeChild(canvases.shift());
}
function init_canvas_container()

View file

@ -433,8 +433,6 @@ class WebRXHandler(BaseHTTPRequestHandler):
if comm_time_counter % 16 == 0:
myclient.last_comm_time=time.time()
print myclient.last_comm_time, comm_time_counter
# ========= process commands =========
while True:
rdata=rxws.recv(self, False)
@ -550,6 +548,7 @@ class WebRXHandler(BaseHTTPRequestHandler):
("%[RX_DEVICE]",cfg.receiver_device),
("%[AUDIO_BUFSIZE]",str(cfg.client_audio_buffer_size)),
("%[START_OFFSET_FREQ]",str(cfg.start_freq-cfg.center_freq)),
("%[FFT_MAX_SEEN]",str(cfg.fft_max_seen)),
("%[START_MOD]",cfg.start_mod)
)
for rule in replace_dictionary: