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;