AP_GPS: added get_type() API

This commit is contained in:
Andrew Tridgell 2020-01-25 10:58:05 +11:00
parent 0b2df61114
commit 7efd5248ee

View File

@ -467,6 +467,11 @@ public:
// handle possibly fragmented RTCM injection data
void handle_gps_rtcm_fragment(uint8_t flags, const uint8_t *data, uint8_t len);
// get configured type by instance
GPS_Type get_type(uint8_t instance) const {
return instance>=GPS_MAX_RECEIVERS? GPS_Type::GPS_TYPE_NONE : GPS_Type(_type[instance].get());
}
protected:
// configuration parameters