Flail around.

This commit is contained in:
W1CDN 2023-12-10 21:04:31 -06:00
parent dc7d4ed8a3
commit 307c1fcd86

View File

@ -28,6 +28,14 @@ def refresh_kiss_connection(kiss_conn):
time.sleep(5) time.sleep(5)
logging.debug("Starting new connection") logging.debug("Starting new connection")
kiss_conn.start() kiss_conn.start()
# alive_frame = aprs.APRSFrame.ui(
# destination="TEST",
# source=config['Settings']['mycall'],
# path=None,
# info=b">None",
# )
# logging.debug("Sending empty frame to keep connection alive")
# kiss_conn.write(alive_frame)
def main(): def main():
@ -43,19 +51,21 @@ def main():
ki = aprs.TCPKISS(host=config['Settings']['kiss_host'], port=int(config['Settings']['kiss_port'])) ki = aprs.TCPKISS(host=config['Settings']['kiss_host'], port=int(config['Settings']['kiss_port']))
ki.start() ki.start()
print(str(ki))
ki.stop()
print(str(ki))
scheduler = AsyncIOScheduler() scheduler = AsyncIOScheduler()
scheduler.add_job(refresh_kiss_connection, 'interval', hours = 1, args = [ki]) scheduler.add_job(refresh_kiss_connection, 'interval', minutes = 1, args = [ki])
scheduler.start() scheduler.start()
# Make a simple frame and send it # Make a simple frame and send it
frame = aprs.APRSFrame.ui( # frame = aprs.APRSFrame.ui(
destination="APZ001", # destination="APZ001",
source=config['Settings']['mycall'], # source=config['Settings']['mycall'],
path=["WIDE1-1"], # path=['WIDE1-1'],
info=b">Hello World!", # info=b">Hello World!",
) # )
#ki.write(frame)
# Watch for new packets to come in # Watch for new packets to come in
while True: while True: