Skip to content

Commit

Permalink
added better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ashum68 committed Aug 20, 2024
1 parent 6455838 commit daddba5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/lidar_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ class LidarDetection:
@classmethod
def create(cls, distance: float, angle: float) -> "tuple[bool, LidarDetection | None]":
"""
distance is in metres.
angle is in degrees.
Distance is in metres.
Angle is in degrees.
"""
# lidar_driver.py returns -1 for an invalid LiDAR reading.
if distance == -1:
return False, None
return True, LidarDetection(cls.__create_key, distance, angle)
Expand Down

0 comments on commit daddba5

Please sign in to comment.