Skip to content

Commit

Permalink
AP_GPS: fix default baud when using alternative to 230400
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed May 16, 2024
1 parent d94e3dd commit b7ff1fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_GPS/AP_GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,12 @@ AP_GPS_Backend *AP_GPS::_detect_instance(uint8_t instance)
type == GPS_TYPE_UBLOX) &&
((!_auto_config && _baudrates[dstate->current_baud] >= 38400) ||
(_baudrates[dstate->current_baud] >= 115200 && option_set(DriverOptions::UBX_Use115200)) ||
_baudrates[dstate->current_baud] == 230400) &&
_baudrates[dstate->current_baud] == AP_GPS_UBLOX_DEFAULT_BAUDRATE) &&
AP_GPS_UBLOX::_detect(dstate->ublox_detect_state, data)) {
return new AP_GPS_UBLOX(*this, params[instance], state[instance], _port[instance], GPS_ROLE_NORMAL);
}

const uint32_t ublox_mb_required_baud = option_set(DriverOptions::UBX_MBUseUart2)?230400:460800;
const uint32_t ublox_mb_required_baud = option_set(DriverOptions::UBX_MBUseUart2)?AP_GPS_UBLOX_DEFAULT_BAUDRATE:460800;
if ((type == GPS_TYPE_UBLOX_RTK_BASE ||
type == GPS_TYPE_UBLOX_RTK_ROVER) &&
_baudrates[dstate->current_baud] == ublox_mb_required_baud &&
Expand Down

0 comments on commit b7ff1fc

Please sign in to comment.