mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:48:52 +08:00
lsm9ds1_mag: minor cleanup
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE drivers__mag__st__lsm9ds1_mag
|
||||
MODULE drivers__magnetometer__st__lsm9ds1_mag
|
||||
MAIN lsm9ds1_mag
|
||||
SRCS
|
||||
lsm9ds1_mag_main.cpp
|
||||
|
||||
@@ -44,12 +44,12 @@ LSM9DS1_MAG::LSM9DS1_MAG(I2CSPIBusOption bus_option, int bus, uint32_t device, e
|
||||
int bus_frequency, spi_mode_e spi_mode) :
|
||||
SPI(MODULE_NAME, nullptr, bus, device, spi_mode, bus_frequency),
|
||||
I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus),
|
||||
_px4_mag(get_device_id(), ORB_PRIO_DEFAULT, rotation)
|
||||
_px4_mag(get_device_id(), external() ? ORB_PRIO_VERY_HIGH : ORB_PRIO_DEFAULT, rotation)
|
||||
{
|
||||
set_device_type(DRV_MAG_DEVTYPE_ST_LSM9DS1_M);
|
||||
_px4_mag.set_device_type(DRV_MAG_DEVTYPE_ST_LSM9DS1_M);
|
||||
|
||||
_px4_mag.set_temperature(NAN); // temperature not available
|
||||
_px4_mag.set_device_type(DRV_MAG_DEVTYPE_ST_LSM9DS1_M);
|
||||
_px4_mag.set_external(external());
|
||||
}
|
||||
|
||||
LSM9DS1_MAG::~LSM9DS1_MAG()
|
||||
@@ -203,6 +203,5 @@ void LSM9DS1_MAG::print_status()
|
||||
perf_print_counter(_interval_perf);
|
||||
perf_print_counter(_transfer_perf);
|
||||
perf_print_counter(_data_overrun_perf);
|
||||
|
||||
_px4_mag.print_status();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user