Added nmux_memory option to config_webrx and added auto calculation of nmux parameters to openwebrx.py. Also bumped version number to 0.15

This commit is contained in:
ha7ilm 2017-01-19 17:54:45 +01:00
parent cabb3adb3b
commit 2c5089d18d
2 changed files with 12 additions and 2 deletions

View File

@ -176,6 +176,8 @@ csdr_dynamic_bufsize = False # This allows you to change the buffering mode of c
csdr_print_bufsizes = False # This prints the buffer sizes used for csdr processes.
csdr_through = False # Setting this True will print out how much data is going into the DSP chains.
nmux_memory = 70 #in megabytes. This sets the approximate size of the circular buffer used by nmux.
#Look up external IP address automatically from icanhazip.com, and use it as [server_hostname]
"""
print "[openwebrx-config] Detecting external IP address..."

View File

@ -20,7 +20,8 @@ print "" # python2.7 is required to run OpenWebRX instead of python3. Please run
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
sw_version="v0.14+"
sw_version="v0.15"
#0.15 (added nmux)
import os
import code
@ -151,7 +152,14 @@ def main():
print "[openwebrx-main] You need to install an up-to-date version of \"csdr\" that contains the \"nmux\" tool to run OpenWebRX! Please upgrade \"csdr\"!\n"
return
if cfg.start_rtl_thread:
cfg.start_rtl_command += "| nmux -p %d -a 127.0.0.1" % cfg.iq_server_port
nmux_bufcnt = nmux_bufsize = 0
while nmux_bufsize < cfg.samp_rate/4: nmux_bufsize += 4096
while nmux_bufsize * nmux_bufcnt < cfg.nmux_memory * 1e6: nmux_bufcnt += 1
if nmux_bufcnt == 0 or nmux_bufsize == 0:
print "[openwebrx-main] Error: nmux_bufsize or nmux_bufcnt is zero. These depend on nmux_memory and samp_rate options in config_webrx.py"
return
print "[openwebrx-main] nmux_bufsize = %d, nmux_bufcnt = %d" % (nmux_bufsize, nmux_bufcnt)
cfg.start_rtl_command += "| nmux --bufsize %d --bufcnt %d --port %d --address 127.0.0.1" % (nmux_bufsize, nmux_bufcnt, cfg.iq_server_port)
rtl_thread=threading.Thread(target = lambda:subprocess.Popen(cfg.start_rtl_command, shell=True), args=())
rtl_thread.start()
print "[openwebrx-main] Started rtl_thread: "+cfg.start_rtl_command