Skip to content

Commit

Permalink
reduce disconnect time condition
Browse files Browse the repository at this point in the history
  • Loading branch information
yabuta committed Apr 25, 2024
1 parent b50f908 commit c2feaf4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/signage/src/signage/autoware_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from tier4_debug_msgs.msg import Float64Stamped
from tier4_external_api_msgs.msg import DoorStatus

DISCONNECT_THRESHOLD = 2

@dataclass
class AutowareInformation:
autoware_control: bool = False
Expand Down Expand Up @@ -92,7 +94,7 @@ def __init__(self, node):
self._node.create_timer(2, self.reset_timer)

def reset_timer(self):
if utils.check_timeout(self._node.get_clock().now(), self._autoware_connection_time, 10):
if utils.check_timeout(self._node.get_clock().now(), self._autoware_connection_time, DISCONNECT_THRESHOLD):
self.information = AutowareInformation()
self._node.get_logger().error("Autoware disconnected", throttle_duration_sec=10)
self.is_disconnected = True
Expand Down

0 comments on commit c2feaf4

Please sign in to comment.