mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-13 12:41:35 +08:00
I2C/SPI require device type in constructor
This commit is contained in:
@@ -37,7 +37,7 @@ constexpr uint8_t L3GD20::_checked_registers[];
|
||||
|
||||
L3GD20::L3GD20(I2CSPIBusOption bus_option, int bus, uint32_t device, enum Rotation rotation, int bus_frequency,
|
||||
spi_mode_e spi_mode) :
|
||||
SPI("L3GD20", nullptr, bus, device, spi_mode, bus_frequency),
|
||||
SPI(DRV_GYR_DEVTYPE_L3GD20, MODULE_NAME, bus, device, spi_mode, bus_frequency),
|
||||
I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus),
|
||||
_px4_gyro(get_device_id(), ORB_PRIO_DEFAULT, rotation),
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": read")),
|
||||
@@ -45,7 +45,6 @@ L3GD20::L3GD20(I2CSPIBusOption bus_option, int bus, uint32_t device, enum Rotati
|
||||
_bad_registers(perf_alloc(PC_COUNT, MODULE_NAME": bad_reg")),
|
||||
_duplicates(perf_alloc(PC_COUNT, MODULE_NAME": dupe"))
|
||||
{
|
||||
_px4_gyro.set_device_type(DRV_GYR_DEVTYPE_L3GD20);
|
||||
}
|
||||
|
||||
L3GD20::~L3GD20()
|
||||
|
||||
Reference in New Issue
Block a user