From 3d67aaab48e2c16a437a215bcc05d640369313fc Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Thu, 17 Jan 2019 22:00:32 -0800 Subject: [PATCH] remove bad error checks --- main/ugv_io_gps.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main/ugv_io_gps.cc b/main/ugv_io_gps.cc index b649eb9..4ad4f84 100644 --- a/main/ugv_io_gps.cc +++ b/main/ugv_io_gps.cc @@ -89,10 +89,8 @@ void UART_GPS::GetData(GpsData &data) { esp_err_t UART_GPS::WriteCommand(const char *cmd, size_t len) { esp_err_t ret; - ret = uart_write_bytes(GPS_UART, cmd, len); - if (ret != ESP_OK) goto err; - ret = uart_write_bytes(GPS_UART, NMEA_END_CMD, sizeof(NMEA_END_CMD)); - if (ret != ESP_OK) goto err; + uart_write_bytes(GPS_UART, cmd, len); + uart_write_bytes(GPS_UART, NMEA_END_CMD, sizeof(NMEA_END_CMD)); ret = uart_wait_tx_done(GPS_UART, 1000); if (ret != ESP_OK) goto err;