daemon: improve type hinting for WayPoint
This commit is contained in:
parent
784c4d2419
commit
a389dc6240
1 changed files with 9 additions and 3 deletions
|
@ -539,7 +539,7 @@ class WayPoint:
|
||||||
self,
|
self,
|
||||||
_time: float,
|
_time: float,
|
||||||
node_id: int,
|
node_id: int,
|
||||||
coords: Tuple[float, float, float],
|
coords: Tuple[float, float, Optional[float]],
|
||||||
speed: float,
|
speed: float,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
|
@ -552,7 +552,7 @@ class WayPoint:
|
||||||
"""
|
"""
|
||||||
self.time: float = _time
|
self.time: float = _time
|
||||||
self.node_id: int = node_id
|
self.node_id: int = node_id
|
||||||
self.coords: Tuple[float, float, float] = coords
|
self.coords: Tuple[float, float, Optional[float]] = coords
|
||||||
self.speed: float = speed
|
self.speed: float = speed
|
||||||
|
|
||||||
def __eq__(self, other: "WayPoint") -> bool:
|
def __eq__(self, other: "WayPoint") -> bool:
|
||||||
|
@ -737,7 +737,13 @@ class WayPointMobility(WirelessModel):
|
||||||
self.session.mobility.updatewlans(moved, moved_netifs)
|
self.session.mobility.updatewlans(moved, moved_netifs)
|
||||||
|
|
||||||
def addwaypoint(
|
def addwaypoint(
|
||||||
self, _time: float, nodenum: int, x: float, y: float, z: float, speed: float
|
self,
|
||||||
|
_time: float,
|
||||||
|
nodenum: int,
|
||||||
|
x: float,
|
||||||
|
y: float,
|
||||||
|
z: Optional[float],
|
||||||
|
speed: float,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Waypoints are pushed to a heapq, sorted by time.
|
Waypoints are pushed to a heapq, sorted by time.
|
||||||
|
|
Loading…
Add table
Reference in a new issue