mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 13:48:54 +08:00
I2C/SPI require device type in constructor
This commit is contained in:
@@ -34,9 +34,9 @@
|
||||
#include "SRF02.hpp"
|
||||
|
||||
SRF02::SRF02(I2CSPIBusOption bus_option, const int bus, const uint8_t rotation, int bus_frequency, int address) :
|
||||
I2C("SRF02", nullptr, bus, address, bus_frequency),
|
||||
I2C(DRV_DIST_DEVTYPE_SRF02, MODULE_NAME, bus, address, bus_frequency),
|
||||
I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus),
|
||||
_px4_rangefinder(0 /* device id not yet used */, ORB_PRIO_DEFAULT, rotation)
|
||||
_px4_rangefinder(get_device_id(), ORB_PRIO_DEFAULT, rotation)
|
||||
{
|
||||
_px4_rangefinder.set_max_distance(SRF02_MAX_DISTANCE);
|
||||
_px4_rangefinder.set_min_distance(SRF02_MIN_DISTANCE);
|
||||
|
||||
Reference in New Issue
Block a user