navd: add repr method to Coordinate (#28959)

* repr coordinate for debugging

* fix

* stash

* better formatting
pull/28963/head
Shane Smiskol 2 years ago committed by GitHub
parent f495c21805
commit cbde480cb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      selfdrive/navd/helpers.py

@ -29,7 +29,10 @@ class Coordinate:
return {'latitude': self.latitude, 'longitude': self.longitude}
def __str__(self) -> str:
return f"({self.latitude}, {self.longitude})"
return f'Coordinate({self.latitude}, {self.longitude})'
def __repr__(self) -> str:
return self.__str__()
def __eq__(self, other) -> bool:
if not isinstance(other, Coordinate):

Loading…
Cancel
Save