Update pydcs, adapt to new Point APIs.

This is briefly moving us over to my fork of pydcs while we wait for
https://github.com/pydcs/dcs/pull/206 to be merged. The adaptation is
invasive enough that I don't want it lingering for long.
This commit is contained in:
Dan Albert
2022-02-21 18:14:49 -08:00
parent ff12b37431
commit 9e2e4ffa74
29 changed files with 155 additions and 186 deletions

View File

@@ -22,8 +22,7 @@ AltitudeReference = Literal["BARO", "RADIO"]
class FlightWaypoint:
name: str
waypoint_type: FlightWaypointType
x: float
y: float
position: Point
alt: Distance = meters(0)
alt_type: AltitudeReference = "BARO"
control_point: ControlPoint | None = None
@@ -50,8 +49,12 @@ class FlightWaypoint:
departure_time: timedelta | None = None
@property
def position(self) -> Point:
return Point(self.x, self.y)
def x(self) -> float:
return self.position.x
@property
def y(self) -> float:
return self.position.y
def __hash__(self) -> int:
return hash(id(self))