mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
AP_GPS: Added ERB to AP_GPS
This commit is contained in:
parent
7e2c822499
commit
3933ac2a63
@ -295,6 +295,11 @@ AP_GPS::detect_instance(uint8_t instance)
|
||||
_broadcast_gps_type("SIRF", instance, dstate->last_baud);
|
||||
new_gps = new AP_GPS_SIRF(*this, state[instance], _port[instance]);
|
||||
}
|
||||
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_ERB) &&
|
||||
AP_GPS_ERB::_detect(dstate->erb_detect_state, data)) {
|
||||
_broadcast_gps_type("ERB", instance, dstate->last_baud);
|
||||
new_gps = new AP_GPS_ERB(*this, state[instance], _port[instance]);
|
||||
}
|
||||
else if (now - dstate->detect_started_ms > (ARRAY_SIZE(_baudrates) * GPS_BAUD_TIME_MS)) {
|
||||
// prevent false detection of NMEA mode in
|
||||
// a MTK or UBLOX which has booted in NMEA mode
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
GPS_TYPE_SBF = 10,
|
||||
GPS_TYPE_GSOF = 11,
|
||||
GPS_TYPE_QURT = 12,
|
||||
GPS_TYPE_ERB = 13,
|
||||
};
|
||||
|
||||
/// GPS status codes
|
||||
@ -379,6 +380,7 @@ private:
|
||||
struct SIRF_detect_state sirf_detect_state;
|
||||
struct NMEA_detect_state nmea_detect_state;
|
||||
struct SBP_detect_state sbp_detect_state;
|
||||
struct ERB_detect_state erb_detect_state;
|
||||
} detect_state[GPS_MAX_INSTANCES];
|
||||
|
||||
struct {
|
||||
@ -408,5 +410,6 @@ private:
|
||||
#include "AP_GPS_QURT.h"
|
||||
#include "AP_GPS_SBF.h"
|
||||
#include "AP_GPS_GSOF.h"
|
||||
#include "AP_GPS_ERB.h"
|
||||
|
||||
#endif // __AP_GPS_H__
|
||||
|
Loading…
Reference in New Issue
Block a user