Browse Source

lsm9ds1_mag: minor cleanup

sbg
Daniel Agar 5 years ago
parent
commit
ade52d612b
  1. 2
      src/drivers/magnetometer/lsm9ds1_mag/CMakeLists.txt
  2. 7
      src/drivers/magnetometer/lsm9ds1_mag/LSM9DS1_MAG.cpp

2
src/drivers/magnetometer/lsm9ds1_mag/CMakeLists.txt

@ -32,7 +32,7 @@ @@ -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

7
src/drivers/magnetometer/lsm9ds1_mag/LSM9DS1_MAG.cpp

@ -44,12 +44,12 @@ LSM9DS1_MAG::LSM9DS1_MAG(I2CSPIBusOption bus_option, int bus, uint32_t device, e @@ -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() @@ -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();
}

Loading…
Cancel
Save