mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_GPS: Add an enum for _auto_config
This commit is contained in:
parent
5f8633e322
commit
249849dfa4
@ -490,12 +490,12 @@ void AP_GPS::detect_instance(uint8_t instance)
|
||||
_port[instance]->set_flow_control(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE);
|
||||
dstate->last_baud_change_ms = now;
|
||||
|
||||
if (_auto_config == 1) {
|
||||
if (_auto_config == GPS_AUTO_CONFIG_ENABLE) {
|
||||
send_blob_start(instance, _initialisation_blob, sizeof(_initialisation_blob));
|
||||
}
|
||||
}
|
||||
|
||||
if (_auto_config == 1) {
|
||||
if (_auto_config == GPS_AUTO_CONFIG_ENABLE) {
|
||||
send_blob_update(instance);
|
||||
}
|
||||
|
||||
@ -594,7 +594,7 @@ void AP_GPS::update_instance(uint8_t instance)
|
||||
return;
|
||||
}
|
||||
|
||||
if (_auto_config == 1) {
|
||||
if (_auto_config == GPS_AUTO_CONFIG_ENABLE) {
|
||||
send_blob_update(instance);
|
||||
}
|
||||
|
||||
|
@ -490,4 +490,11 @@ private:
|
||||
|
||||
// calculate the blended state
|
||||
void calc_blended_state(void);
|
||||
|
||||
// Auto configure types
|
||||
enum GPS_AUTO_CONFIG {
|
||||
GPS_AUTO_CONFIG_DISABLE = 0,
|
||||
GPS_AUTO_CONFIG_ENABLE = 1
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -79,7 +79,7 @@ void
|
||||
AP_GPS_UBLOX::_request_next_config(void)
|
||||
{
|
||||
// don't request config if we shouldn't configure the GPS
|
||||
if (gps._auto_config == 0) {
|
||||
if (gps._auto_config == AP_GPS::GPS_AUTO_CONFIG_DISABLE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1315,7 +1315,7 @@ bool AP_GPS_UBLOX::get_lag(float &lag_sec) const
|
||||
// always bail out in this case, it's used to indicate we have yet to receive a valid
|
||||
// hardware generation, however the user may have inhibited us detecting the generation
|
||||
// so if we aren't allowed to do configuration, we will accept this as the default delay
|
||||
return gps._auto_config != 1;
|
||||
return gps._auto_config != AP_GPS::GPS_AUTO_CONFIG_ENABLE;
|
||||
case UBLOX_5:
|
||||
case UBLOX_6:
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user