Add websocket event stream for sim updates.

As a proof of concept this only covers the flight positions.
This commit is contained in:
Dan Albert
2022-02-16 01:28:10 -08:00
parent 350f08be2f
commit 21f7912458
14 changed files with 150 additions and 15 deletions

View File

@@ -17,6 +17,7 @@ from .waypointjs import WaypointJs
class FlightJs(QObject):
idChanged = Signal()
positionChanged = Signal()
flightPlanChanged = Signal()
blueChanged = Signal()
@@ -50,6 +51,10 @@ class FlightJs(QObject):
self.ato_model = ato_model
self._waypoints = self.make_waypoints()
@Property(str, notify=idChanged)
def id(self) -> str:
return str(self.flight.id)
def update_waypoints(self) -> None:
for waypoint in self._waypoints:
waypoint.timingChanged.emit()