From ce564b4448a99f5eac224510460d430f357378c2 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Thu, 26 Feb 2026 12:51:49 +1300 Subject: [PATCH] lightware_grf_serial: disable flow control (#26575) * lightware_grf_serial: disable flow control This might fix serial comms with the Lightware sensor. * update sf45 to disable hw flow control Signed-off-by: dirksavage88 --------- Signed-off-by: dirksavage88 Co-authored-by: dirksavage88 --- .../lightware_grf_serial/lightware_grf_serial.cpp | 4 ++-- .../lightware_sf45_serial/lightware_sf45_serial.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/distance_sensor/lightware_grf_serial/lightware_grf_serial.cpp b/src/drivers/distance_sensor/lightware_grf_serial/lightware_grf_serial.cpp index 403c61f562..82cabca08c 100755 --- a/src/drivers/distance_sensor/lightware_grf_serial/lightware_grf_serial.cpp +++ b/src/drivers/distance_sensor/lightware_grf_serial/lightware_grf_serial.cpp @@ -256,8 +256,8 @@ void GRFLaserSerial::Run() /* clear ONLCR flag (which appends a CR for every LF) */ uart_config.c_oflag &= ~ONLCR; - /* no parity, one stop bit */ - uart_config.c_cflag &= ~(CSTOPB | PARENB); + /* no parity, one stop bit, no hardware flow control */ + uart_config.c_cflag &= ~(CSTOPB | PARENB | CRTSCTS); unsigned speed = B115200; 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 e15c43a44e..561d2bc555 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 @@ -253,7 +253,7 @@ void SF45LaserSerial::Run() uart_config.c_oflag &= ~ONLCR; /* no parity, one stop bit */ - uart_config.c_cflag &= ~(CSTOPB | PARENB); + uart_config.c_cflag &= ~(CSTOPB | PARENB | CRTSCTS); unsigned speed = B921600;