Skip to content

Commit

Permalink
Merge pull request #27 from CWRUbotix/fix-typing
Browse files Browse the repository at this point in the history
Update timer.py
  • Loading branch information
InvincibleRMC authored Jul 9, 2024
2 parents ff007a1 + cc3b669 commit da20ef3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/surface/gui/gui/gui_nodes/auxiliary_nodes/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ def do_tick(self) -> None:
timestamp = self.get_clock().now()

if self.is_running and self.last_timestamp is not None:
self.time_left = self.last_timestamp + self.time_left - timestamp
# TODO: Michael upstream typing oopsy
# https://github.com/ros2/rclpy/pull/1312
time_left = self.last_timestamp + self.time_left - timestamp
assert isinstance(time_left, Duration)
self.time_left = time_left

if self.time_left < Duration(seconds=0):
self.is_running = False
Expand Down

0 comments on commit da20ef3

Please sign in to comment.