mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 09:13:32 +08:00
LSM303D: Fix devid
This commit is contained in:
@@ -1642,8 +1642,8 @@ LSM303D::measure()
|
||||
accel_report.scaling = _accel_range_scale;
|
||||
accel_report.range_m_s2 = _accel_range_m_s2;
|
||||
|
||||
/* Return class instance as a surrogate device ID */
|
||||
accel_report.device_id = _accel_class_instance;
|
||||
/* return device ID */
|
||||
accel_report.device_id = _device_id;
|
||||
|
||||
_accel_reports->force(&accel_report);
|
||||
|
||||
@@ -1729,6 +1729,7 @@ LSM303D::mag_measure()
|
||||
*/
|
||||
_last_temperature = 25 + (raw_mag_report.temperature * 0.125f);
|
||||
mag_report.temperature = _last_temperature;
|
||||
mag_report.device_id = _mag->_device_id;
|
||||
|
||||
_mag_reports->force(&mag_report);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user