2024-02-03 09:57:56 +00:00
|
|
|
import frame_handler_ping
|
|
|
|
import helpers
|
|
|
|
import data_frame_factory
|
|
|
|
import frame_handler
|
|
|
|
import datetime
|
|
|
|
from message_system_db_beacon import DatabaseManagerBeacon
|
2024-02-16 10:02:10 +00:00
|
|
|
from message_system_db_messages import DatabaseManagerMessages
|
2024-02-03 09:57:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
from message_system_db_manager import DatabaseManager
|
|
|
|
class BeaconFrameHandler(frame_handler.FrameHandler):
|
|
|
|
|
|
|
|
def follow_protocol(self):
|
|
|
|
DatabaseManagerBeacon(self.event_manager).add_beacon(datetime.datetime.now(),
|
|
|
|
self.details['frame']["origin"],
|
|
|
|
self.details["snr"],
|
2024-04-13 10:57:33 +00:00
|
|
|
self.details['frame']["gridsquare"],
|
|
|
|
self.details['frame']["flag"]["away_from_key"]
|
2024-02-03 09:57:56 +00:00
|
|
|
)
|
2024-02-16 10:02:10 +00:00
|
|
|
|
2024-02-18 20:08:14 +00:00
|
|
|
if self.config["MESSAGES"]["enable_auto_repeat"]:
|
|
|
|
# set message to queued if beacon received
|
|
|
|
DatabaseManagerMessages(self.event_manager).set_message_to_queued_for_callsign(self.details['frame']["origin"])
|