mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 00:03:33 +08:00
posix drivers: Populate device ID in sensor topics for simulated IMU
This commit is contained in:
committed by
Lorenz Meier
parent
961474f430
commit
da87e3eb0a
@@ -1107,6 +1107,9 @@ GYROSIM::_measure()
|
||||
arb.y_integral = aval_integrated(1);
|
||||
arb.z_integral = aval_integrated(2);
|
||||
|
||||
/* TODO return unique hardware ID */
|
||||
arb.device_id = 0;
|
||||
|
||||
grb.x_raw = (int16_t)(mpu_report.gyro_x / _gyro_range_scale);
|
||||
grb.y_raw = (int16_t)(mpu_report.gyro_y / _gyro_range_scale);
|
||||
grb.z_raw = (int16_t)(mpu_report.gyro_z / _gyro_range_scale);
|
||||
@@ -1129,6 +1132,9 @@ GYROSIM::_measure()
|
||||
grb.y_integral = gval_integrated(1);
|
||||
grb.z_integral = gval_integrated(2);
|
||||
|
||||
/* TODO return unique hardware ID */
|
||||
grb.device_id = 0;
|
||||
|
||||
_accel_reports->force(&arb);
|
||||
_gyro_reports->force(&grb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user