1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-12-21 17:11:01 -05:00

Fix some pep8 issues

This commit is contained in:
Hemna 2024-03-23 10:24:02 -04:00
parent 1e6c483002
commit b461231c00
3 changed files with 5 additions and 6 deletions

View File

@ -190,7 +190,7 @@ def listen(
aprs_client.set_filter(filter)
keepalive = threads.KeepAliveThread()
#keepalive.start()
# keepalive.start()
if CONF.rpc_settings.enabled:
rpc = rpc_server.APRSDRPCThread()
@ -215,6 +215,7 @@ def listen(
)
LOG.debug("Start APRSDListenThread")
listen_thread.start()
keepalive.start()
LOG.debug("keepalive Join")
keepalive.join()

View File

@ -10,7 +10,7 @@ from aprsd.conf import log as conf_log
CONF = cfg.CONF
#LOG = logging.getLogger("APRSD")
# LOG = logging.getLogger("APRSD")
LOG = logger
logging_queue = queue.Queue()

View File

@ -146,7 +146,6 @@ class Packet:
msg = self._filter_for_send().rstrip("\n")
return msg
def prepare(self) -> None:
"""Do stuff here that is needed prior to sending over the air."""
# now build the raw message for sending
@ -292,7 +291,6 @@ class StatusPacket(Packet):
return self.status
@dataclass_json
@dataclass(unsafe_hash=True)
class GPSPacket(Packet):
@ -427,7 +425,6 @@ class GPSPacket(Packet):
@property
def human_info(self) -> str:
#LOG.warning(self.to_dict())
h_str = []
h_str.append(f"Lat:{self.latitude:03.3f}")
h_str.append(f"Lon:{self.longitude:03.3f}")
@ -494,6 +491,7 @@ class MicEPacket(GPSPacket):
h_info = super().human_info
return f"{h_info} {self.mbits} mbits"
@dataclass_json
@dataclass
class TelemetryPacket(GPSPacket):
@ -875,6 +873,6 @@ def factory(raw_packet: dict[Any, Any]) -> type[Packet]:
# f"factory(<green>{packet_type: <8}</green>):"
# f"(<red>{packet_class.__name__: <13}</red>): "
# f"<light-blue>{raw.get('from_call'): <9}</light-blue> -> <cyan>{to: <9}</cyan>")
#LOG.info(raw.get('msgNo'))
# LOG.info(raw.get('msgNo'))
return packet_class().from_dict(raw) # type: ignore