Add FastAPI interface between the game and map.

A possible explanation for the infrequent CTDs we've been seeing since
adding fast forward is that QWebChannel doesn't keep a reference to the
python objects that it passes to js, so if the object is GC'd before the
front end is done with it, it crashes.

We don't really like QWebChannel anyway, so this begins replacing that
with FastAPI.
This commit is contained in:
Dan Albert
2022-02-13 14:22:05 -08:00
parent 1df31b2496
commit 350f08be2f
33 changed files with 419 additions and 330 deletions

View File

@@ -8,12 +8,11 @@ from shapely.geometry import LineString, Point as ShapelyPoint
from game.ato import Flight, FlightWaypoint
from game.ato.flightstate import InFlight
from game.ato.flightwaypointtype import FlightWaypointType
from game.server.leaflet import LeafletLatLon, LeafletPoly, ShapelyUtil
from game.theater import ConflictTheater
from game.utils import meters
from gen.flights.flightplan import CasFlightPlan, PatrollingFlightPlan
from qt_ui.models import AtoModel
from .leaflet import LeafletLatLon, LeafletPoly
from .shapelyutil import ShapelyUtil
from .waypointjs import WaypointJs