add gridsquare to event if available

This commit is contained in:
DJ2LS 2024-03-27 09:34:06 +01:00
parent ef4ea345fd
commit 7811aae324

View file

@ -118,6 +118,10 @@ class FrameHandler():
if 'origin' in self.details['frame']:
event['dxcallsign'] = self.details['frame']['origin']
if 'gridsquare' in self.details['frame']:
event['gridsquare'] = self.details['frame']['gridsquare']
return event
def emit_event(self):
@ -146,6 +150,8 @@ class FrameHandler():
self.details['freedv_inst'] = freedv_inst
self.details['bytes_per_frame'] = bytes_per_frame
print(self.details)
# look in database for a full callsign if only crc is present
if 'origin' not in frame and 'origin_crc' in frame:
self.details['frame']['origin'] = DatabaseManager(self.event_manager).get_callsign_by_checksum(frame['origin_crc'])