diff --git a/boswatch.py b/boswatch.py index a48a390..e892763 100755 --- a/boswatch.py +++ b/boswatch.py @@ -47,6 +47,7 @@ try: parser.add_argument("-e", "--error", help="Frequency-Error of your device in PPM", type=int, default=0) parser.add_argument("-a", "--demod", help="Demodulation functions", choices=['FMS', 'ZVEI', 'POC512', 'POC1200', 'POC2400'], required=True, nargs="+") parser.add_argument("-s", "--squelch", help="Level of squelch", type=int, default=0) + parser.add_argument("-g", "--gain", help="Level of gain", type=int, default=0) parser.add_argument("-u", "--usevarlog", help="Use '/var/log/boswatch' for logfiles instead of subdir 'log' in BOSWatch directory", action="store_true") parser.add_argument("-v", "--verbose", help="Shows more information", action="store_true") parser.add_argument("-q", "--quiet", help="Shows no information. Only logfiles", action="store_true") @@ -163,6 +164,7 @@ try: logging.debug(" - Device: %s", args.device) logging.debug(" - PPM Error: %s", args.error) logging.debug(" - Squelch: %s", args.squelch) + logging.debug(" - Gain: %s", args.gain) demodulation = "" if "FMS" in args.demod: @@ -217,7 +219,7 @@ try: logging.debug("cannot read config file", exc_info=True) exit(1) - + # # Set the loglevel and backupCount of the file handler # @@ -232,7 +234,7 @@ try: logging.debug("cannot set loglevel of fileHandler", exc_info=True) pass - + # # Add NMA logging handler # @@ -255,10 +257,10 @@ try: logging.error("cannot add NMA logging handler") logging.debug("cannot add NMA logging handler", exc_info=True) pass - - + + # initialization was fine, continue with main program... - + # # Load plugins # @@ -306,7 +308,7 @@ try: command = "" if globals.config.has_option("BOSWatch","rtl_path"): command = globals.config.get("BOSWatch","rtl_path") - command = command+"rtl_fm -d "+str(args.device)+" -f "+str(freqConverter.freqToHz(args.freq))+" -M fm -s 22050 -p "+str(args.error)+" -E DC -F 0 -l "+str(args.squelch)+" -g 100" + command = command+"rtl_fm -d "+str(args.device)+" -f "+str(freqConverter.freqToHz(args.freq))+" -M fm -p "+str(args.error)+" -E DC -F 0 -l "+str(args.squelch)+" -g "+str(args.gain)+" -s 22050" rtl_fm = subprocess.Popen(command.split(), #stdin=rtl_fm.stdout, stdout=subprocess.PIPE, @@ -411,4 +413,4 @@ finally: if nmaHandler: nmaHandler.close() fh.close() - ch.close() \ No newline at end of file + ch.close() diff --git a/includes/globals.py b/includes/globals.py index 8135ec6..c9517c0 100644 --- a/includes/globals.py +++ b/includes/globals.py @@ -10,7 +10,7 @@ Global variables # version info versionNr = "2.1-dev" -buildDate = "2015/07/31" +buildDate = "2015/12/26" # Global variables config = 0 @@ -18,4 +18,4 @@ script_path = "" log_path = "" # pluginLoader -pluginList = {} \ No newline at end of file +pluginList = {} diff --git a/includes/shellHeader.py b/includes/shellHeader.py index 227346d..8510da5 100644 --- a/includes/shellHeader.py +++ b/includes/shellHeader.py @@ -49,6 +49,7 @@ def printHeader(args): if "POC2400" in args.demod: print "- POC2400" print "Squelch: "+str(args.squelch) + print "Gain: "+str(args.gain) if args.verbose: print "Verbose Mode!" if args.test: