From 1e30e04ef7bdad3f6cb391eee26ae32b2d2306e4 Mon Sep 17 00:00:00 2001 From: dirksavage88 Date: Sun, 18 Aug 2024 18:11:10 -0400 Subject: [PATCH] increase fail count Signed-off-by: dirksavage88 --- .../lightware_sf45_serial/lightware_sf45_serial.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp b/src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp index 8695627cc5ef..79c15ef703ba 100755 --- a/src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp +++ b/src/drivers/distance_sensor/lightware_sf45_serial/lightware_sf45_serial.cpp @@ -164,9 +164,8 @@ int SF45LaserSerial::collect() /* read from the sensor (uart buffer) */ const hrt_abstime timestamp_sample = hrt_absolute_time(); - if (_consecutive_fail_count > 15 && !_sensor_ready) { + if (_consecutive_fail_count > 50 && !_sensor_ready) { PX4_ERR("Restarting the state machine"); - _consecutive_fail_count = 0; start(); }