mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-20 19:32:19 +08:00
Fix up DriverFramework wrappers, bring them back to the real device ID they have already in-built
This commit is contained in:
@@ -155,10 +155,8 @@ int DfBmp280Wrapper::_publish(struct baro_sensor_data &data)
|
||||
|
||||
baro_report.pressure = data.pressure_pa;
|
||||
baro_report.temperature = data.temperature_c;
|
||||
// TODO: verify this, it's just copied from the MS5611 driver.
|
||||
|
||||
/* TODO get device ID for sensor */
|
||||
baro_report.device_id = 0;
|
||||
// TODO: verify this, it's just copied from the MS5611 driver.
|
||||
|
||||
// Constant for now
|
||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
||||
|
||||
@@ -689,16 +689,10 @@ int DfLsm9ds1Wrapper::_publish(struct imu_sensor_data &data)
|
||||
gyro_report.y_integral = gyro_val_integ(1);
|
||||
gyro_report.z_integral = gyro_val_integ(2);
|
||||
|
||||
/* TODO return unique hardware ID */
|
||||
gyro_report.device_id = 0;
|
||||
|
||||
accel_report.x_integral = accel_val_integ(0);
|
||||
accel_report.y_integral = accel_val_integ(1);
|
||||
accel_report.z_integral = accel_val_integ(2);
|
||||
|
||||
/* TODO return unique hardware ID */
|
||||
accel_report.device_id = 0;
|
||||
|
||||
// TODO: when is this ever blocked?
|
||||
if (!(m_pub_blocked)) {
|
||||
|
||||
|
||||
@@ -531,16 +531,10 @@ int DfMPU6050Wrapper::_publish(struct imu_sensor_data &data)
|
||||
gyro_report.y_integral = gyro_val_integ(1);
|
||||
gyro_report.z_integral = gyro_val_integ(2);
|
||||
|
||||
/* TODO return unique hardware ID */
|
||||
gyro_report.device_id = 0;
|
||||
|
||||
accel_report.x_integral = accel_val_integ(0);
|
||||
accel_report.y_integral = accel_val_integ(1);
|
||||
accel_report.z_integral = accel_val_integ(2);
|
||||
|
||||
/* TODO return unique hardware ID */
|
||||
accel_report.device_id = 0;
|
||||
|
||||
// TODO: when is this ever blocked?
|
||||
if (!(m_pub_blocked)) {
|
||||
|
||||
|
||||
@@ -708,16 +708,10 @@ int DfMpu9250Wrapper::_publish(struct imu_sensor_data &data)
|
||||
gyro_report.y_integral = gyro_val_integ(1);
|
||||
gyro_report.z_integral = gyro_val_integ(2);
|
||||
|
||||
/* TODO return unique hardware ID */
|
||||
gyro_report.device_id = 0;
|
||||
|
||||
accel_report.x_integral = accel_val_integ(0);
|
||||
accel_report.y_integral = accel_val_integ(1);
|
||||
accel_report.z_integral = accel_val_integ(2);
|
||||
|
||||
/* TODO return unique hardware ID */
|
||||
accel_report.device_id = 0;
|
||||
|
||||
// TODO: when is this ever blocked?
|
||||
if (!(m_pub_blocked)) {
|
||||
|
||||
|
||||
@@ -156,9 +156,6 @@ int DfMS5607Wrapper::_publish(struct baro_sensor_data &data)
|
||||
|
||||
// TODO: verify this, it's just copied from the MS5611 driver.
|
||||
|
||||
/* TODO get device ID for sensor */
|
||||
baro_report.device_id = 0;
|
||||
|
||||
// Constant for now
|
||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
||||
|
||||
|
||||
@@ -156,9 +156,6 @@ int DfMS5611Wrapper::_publish(struct baro_sensor_data &data)
|
||||
|
||||
// TODO: verify this, it's just copied from the MS5611 driver.
|
||||
|
||||
/* TODO get device ID for sensor */
|
||||
baro_report.device_id = 0;
|
||||
|
||||
// Constant for now
|
||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user