mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
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;
|
||||
|
||||
// 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
|
||||
// any sensor which can current supply it
|
||||
uint16_t distance_cm_orient(enum Rotation orientation) const;
|
||||
|
Loading…
Reference in New Issue
Block a user