diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-03 13:49:18 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-09 22:56:23 +0100 |
commit | 1c2e39bc7516d9b4519a3dc37ce0a3477fed9a64 (patch) | |
tree | 3a0cbac4c3923aea2acaaa30ae57991508210a59 /src/drivers/lsm303d/lsm303d.cpp | |
parent | 83c4da96357dcc77a62d6adf9094dd5dde221987 (diff) | |
download | px4-firmware-1c2e39bc7516d9b4519a3dc37ce0a3477fed9a64.tar.gz px4-firmware-1c2e39bc7516d9b4519a3dc37ce0a3477fed9a64.tar.bz2 px4-firmware-1c2e39bc7516d9b4519a3dc37ce0a3477fed9a64.zip |
LSM303D: move to 0 based index
Diffstat (limited to 'src/drivers/lsm303d/lsm303d.cpp')
-rw-r--r-- | src/drivers/lsm303d/lsm303d.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/lsm303d/lsm303d.cpp b/src/drivers/lsm303d/lsm303d.cpp index 6edb9d787..736ecaa32 100644 --- a/src/drivers/lsm303d/lsm303d.cpp +++ b/src/drivers/lsm303d/lsm303d.cpp @@ -609,7 +609,7 @@ LSM303D::~LSM303D() delete _mag_reports; if (_accel_class_instance != -1) - unregister_class_devname(ACCEL_DEVICE_PATH, _accel_class_instance); + unregister_class_devname(ACCEL_BASE_DEVICE_PATH, _accel_class_instance); delete _mag; @@ -668,7 +668,7 @@ LSM303D::init() } - _accel_class_instance = register_class_devname(ACCEL_DEVICE_PATH); + _accel_class_instance = register_class_devname(ACCEL_BASE_DEVICE_PATH); /* advertise sensor topic, measure manually to initialize valid report */ struct accel_report arp; @@ -1745,7 +1745,7 @@ LSM303D_mag::LSM303D_mag(LSM303D *parent) : LSM303D_mag::~LSM303D_mag() { if (_mag_class_instance != -1) - unregister_class_devname(MAG_DEVICE_PATH, _mag_class_instance); + unregister_class_devname(MAG_BASE_DEVICE_PATH, _mag_class_instance); } int @@ -1757,7 +1757,7 @@ LSM303D_mag::init() if (ret != OK) goto out; - _mag_class_instance = register_class_devname(MAG_DEVICE_PATH); + _mag_class_instance = register_class_devname(MAG_BASE_DEVICE_PATH); out: return ret; |