mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add websocket event stream for sim updates.
As a proof of concept this only covers the flight positions.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user