Browse Source

remove bad error checks

ugv_io
Alex Mikhalev 6 years ago
parent
commit
3d67aaab48
  1. 6
      main/ugv_io_gps.cc

6
main/ugv_io_gps.cc

@ -89,10 +89,8 @@ void UART_GPS::GetData(GpsData &data) { @@ -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;

Loading…
Cancel
Save