Browse Source

AP_HAL: added get_bus_address()

used to report sensor probing results in drivers
master
Andrew Tridgell 8 years ago committed by Tom Pittenger
parent
commit
c657ad449b
  1. 5
      libraries/AP_HAL/Device.h

5
libraries/AP_HAL/Device.h

@ -61,6 +61,11 @@ public: @@ -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;

Loading…
Cancel
Save