From b1742dafc2137f01c4502d6c8291c83e40dff65a Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Mon, 23 Sep 2019 16:51:38 +0200 Subject: [PATCH] incomplete implementation to extend a callsign location --- owrx/map.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/owrx/map.py b/owrx/map.py index a27a0e0..9dc5c48 100644 --- a/owrx/map.py +++ b/owrx/map.py @@ -77,6 +77,13 @@ class Map(object): ] ) + def touchLocation(self, callsign): + # not implemented on the client side yet, so do not use! + ts = datetime.now() + if callsign in self.positions: + self.positions[callsign]["updated"] = ts + self.broadcast([{"callsign": callsign, "lastseen": ts.timestamp() * 1000}]) + def removeLocation(self, callsign): self.positions.pop(callsign, None) # TODO broadcast removal to clients