From 7811aae32433533ead954cf01df5c189655c71ba Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Wed, 27 Mar 2024 09:34:06 +0100 Subject: [PATCH] add gridsquare to event if available --- modem/frame_handler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modem/frame_handler.py b/modem/frame_handler.py index 46347d1e..612e353a 100644 --- a/modem/frame_handler.py +++ b/modem/frame_handler.py @@ -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'])