mirror of
https://amiok.net/gitea/W1CDN/aprs_tool.git
synced 2025-07-18 02:00:27 +00:00
Barely parse a frame.
This commit is contained in:
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user