fixed comparison logic for waypoints and added tests to help catch issue in the future
This commit is contained in:
parent
471f40a0bd
commit
8572e153f4
2 changed files with 21 additions and 4 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue