fixed comparison logic for waypoints and added tests to help catch issue in the future

This commit is contained in:
Blake Harnden 2020-02-19 21:21:21 -08:00
parent 471f40a0bd
commit 8572e153f4
2 changed files with 21 additions and 4 deletions

View file

@ -570,10 +570,10 @@ class WayPoint:
return not self == other
def __lt__(self, other: "WayPoint") -> bool:
result = self.time < other.time
if result:
result = self.nodenum < other.nodenum
return result
if self.time == other.time:
return self.nodenum < other.nodenum
else:
return self.time < other.time
class WayPointMobility(WirelessModel):