Skip to content

Commit e1fcfba

Browse files
committed
Enhance obstacle detection logging by including distance measurement in the log message
1 parent e591cf4 commit e1fcfba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/HL/Car.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def has_Crashed(self):
170170
if len(small_distances) > 2:
171171
# min_index = self.lidar.rDistance.index(min(small_distances))
172172
while self.tof.get_distance() < REAR_BACKUP_DIST:
173-
log.info("Obstacle arriere détecté")
173+
log.info(f"Obstacle arriere détecté {self.tof.get_distance()}")
174174
self.set_vitesse_m_s(0)
175175
time.sleep(0.1)
176176
return True

0 commit comments

Comments
 (0)