mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Merge pull request #692 from DJ2LS/dev-add-grid-to-event
add gridsquare to event
This commit is contained in:
commit
b0e46fb998
1 changed files with 6 additions and 0 deletions
|
@ -132,6 +132,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):
|
||||
|
@ -160,6 +164,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'])
|
||||
|
|
Loading…
Reference in a new issue