AP_HAL: added get_bus_address()

used to report sensor probing results in drivers
This commit is contained in:
Andrew Tridgell 2016-12-01 20:58:25 +11:00 committed by Tom Pittenger
parent 60c29417f1
commit c657ad449b
1 changed files with 5 additions and 0 deletions

View File

@ -61,6 +61,11 @@ public:
return _bus_id.devid;
}
// return address on bus
uint8_t get_bus_address(void) const {
return _bus_id.devid_s.address;
}
// set device type within a device class (eg. AP_COMPASS_TYPE_LSM303D)
void set_device_type(uint8_t devtype) {
_bus_id.devid_s.devtype = devtype;