Barely parse a frame.

This commit is contained in:
2023-04-13 21:38:51 -05:00
parent 4f83f76bf5
commit b06b87fe4e
2 changed files with 5 additions and 53 deletions

View File

@ -3,6 +3,7 @@ import os
import sqlite3
import aprs
import json
import aprslib
MYCALL = os.environ.get("MYCALL", "W1CDN")
@ -26,12 +27,12 @@ def main():
ki.write(frame)
while True:
for frame in ki.read(min_frames=1):
print(repr(frame))
a = str(frame)
#print(repr(frame))
a = aprslib.parse(str(frame))
print(a)
conn = get_db_connection()
conn.execute('INSERT INTO frames (frame) VALUES (?)',
(a,))
# conn.execute('INSERT INTO frames (frame) VALUES (?)',
# (a,))
conn.commit()
conn.close()