From 53115c73f969ea88243a172c4605ae9e7448a369 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 6 Oct 2023 13:55:40 +1100 Subject: [PATCH] AP_GPS: have AP_GPS_UBLOX use boolean uart read --- libraries/AP_GPS/AP_GPS_UBLOX.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libraries/AP_GPS/AP_GPS_UBLOX.cpp b/libraries/AP_GPS/AP_GPS_UBLOX.cpp index 9b2be38adb..e0375d654a 100644 --- a/libraries/AP_GPS/AP_GPS_UBLOX.cpp +++ b/libraries/AP_GPS/AP_GPS_UBLOX.cpp @@ -594,11 +594,10 @@ AP_GPS_UBLOX::read(void) for (uint16_t i = 0; i < numc; i++) { // Process bytes received // read the next byte - const int16_t rdata = port->read(); - if (rdata < 0) { + uint8_t data; + if (!port->read(data)) { break; } - const uint8_t data = rdata; #if AP_GPS_DEBUG_LOGGING_ENABLED log_data(&data, 1); #endif