Skip to content

Commit

Permalink
Changed check lidar
Browse files Browse the repository at this point in the history
  • Loading branch information
VincidaB committed May 11, 2024
1 parent 26f9159 commit 8ac7030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/listen_package/listen_package/ecoute.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def listener_callback(self, msg):
self.runningCount = self.runningCount + 1 if self.runningCount < self.runningCountLimit else self.runningCountLimit
else:
self.runningCount = self.runningCount - 1 if self.runningCount > 0 else 0
if self.runningCount > 0:
if self.runningCount >= self.runningCountLimit:
self.get_logger().info("Object detected at distance: %f" % range_value)
self.publisher.publish(String(data='Object detected'))

Expand Down

0 comments on commit 8ac7030

Please sign in to comment.