AP_RangeFinder: added get_type() API
This commit is contained in:
parent
7efd5248ee
commit
2fa6f534ab
@ -139,6 +139,11 @@ public:
|
|||||||
|
|
||||||
AP_RangeFinder_Backend *get_backend(uint8_t id) const;
|
AP_RangeFinder_Backend *get_backend(uint8_t id) const;
|
||||||
|
|
||||||
|
// get rangefinder type for an ID
|
||||||
|
Type get_type(uint8_t id) const {
|
||||||
|
return id >= RANGEFINDER_MAX_INSTANCES? Type::NONE : Type(params[id].type.get());
|
||||||
|
}
|
||||||
|
|
||||||
// methods to return a distance on a particular orientation from
|
// methods to return a distance on a particular orientation from
|
||||||
// any sensor which can current supply it
|
// any sensor which can current supply it
|
||||||
uint16_t distance_cm_orient(enum Rotation orientation) const;
|
uint16_t distance_cm_orient(enum Rotation orientation) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user