diff --git a/csdr.py b/csdr.py index 4aedc88..f921239 100644 --- a/csdr.py +++ b/csdr.py @@ -559,7 +559,9 @@ class dsp(object): def try_create_configs(self, command): if "{direwolf_config}" in command: - self.direwolf_config = "{tmp_dir}/openwebrx_direwolf_{myid}.conf".format(tmp_dir=self.temporary_directory, myid=id(self)) + self.direwolf_config = "{tmp_dir}/openwebrx_direwolf_{myid}.conf".format( + tmp_dir=self.temporary_directory, myid=id(self) + ) self.direwolf_port = KissClient.getFreePort() file = open(self.direwolf_config, "w") file.write(DirewolfConfig().getConfig(self.direwolf_port)) diff --git a/owrx/aprs.py b/owrx/aprs.py index ac48d55..084318e 100644 --- a/owrx/aprs.py +++ b/owrx/aprs.py @@ -195,10 +195,7 @@ class AprsParser(object): comment = information[19:] def decodeHeightGainDirectivity(comment): - res = { - "height": 2 ** int(comment[4]) * 10 * feetToMeters, - "gain": int(comment[5]), - } + res = {"height": 2 ** int(comment[4]) * 10 * feetToMeters, "gain": int(comment[5])} directivity = int(comment[6]) if directivity == 0: res["directivity"] = "omni" @@ -353,7 +350,7 @@ class MicEParser(object): altitude = next((a for a in [altitude, insideAltitude] if a is not None), None) return { - "fix": information[0] == ord("`") or information[0] == 0x1c, + "fix": information[0] == ord("`") or information[0] == 0x1C, "lat": lat, "lon": lon, "comment": comment, diff --git a/owrx/kiss.py b/owrx/kiss.py index 67dc319..02f01c0 100644 --- a/owrx/kiss.py +++ b/owrx/kiss.py @@ -22,8 +22,7 @@ MODEM 1200 KISSPORT {port} AGWPORT off """.format( - port=port, - callsign=pm["aprs_callsign"], + port=port, callsign=pm["aprs_callsign"] ) if pm["aprs_igate_enabled"]: @@ -31,9 +30,7 @@ AGWPORT off IGSERVER {server} IGLOGIN {callsign} {password} """.format( - server=pm["aprs_igate_server"], - callsign=pm["aprs_callsign"], - password=pm["aprs_igate_password"], + server=pm["aprs_igate_server"], callsign=pm["aprs_callsign"], password=pm["aprs_igate_password"] ) if pm["aprs_igate_beacon"]: @@ -43,7 +40,9 @@ IGLOGIN {callsign} {password} config += """ PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=R lat={lat} long={lon} comment="OpenWebRX APRS gateway" - """.format(lat=lat, lon=lon) + """.format( + lat=lat, lon=lon + ) return config @@ -57,7 +56,7 @@ class KissClient(object): port = random.randrange(1024, 49151) # test if port is available for use s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.bind(('localhost', port)) + s.bind(("localhost", port)) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.close() return port