mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +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.pressure = data.pressure_pa;
|
||||||
baro_report.temperature = data.temperature_c;
|
baro_report.temperature = data.temperature_c;
|
||||||
// TODO: verify this, it's just copied from the MS5611 driver.
|
|
||||||
|
|
||||||
/* TODO get device ID for sensor */
|
// TODO: verify this, it's just copied from the MS5611 driver.
|
||||||
baro_report.device_id = 0;
|
|
||||||
|
|
||||||
// Constant for now
|
// Constant for now
|
||||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
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.y_integral = gyro_val_integ(1);
|
||||||
gyro_report.z_integral = gyro_val_integ(2);
|
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.x_integral = accel_val_integ(0);
|
||||||
accel_report.y_integral = accel_val_integ(1);
|
accel_report.y_integral = accel_val_integ(1);
|
||||||
accel_report.z_integral = accel_val_integ(2);
|
accel_report.z_integral = accel_val_integ(2);
|
||||||
|
|
||||||
/* TODO return unique hardware ID */
|
|
||||||
accel_report.device_id = 0;
|
|
||||||
|
|
||||||
// TODO: when is this ever blocked?
|
// TODO: when is this ever blocked?
|
||||||
if (!(m_pub_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.y_integral = gyro_val_integ(1);
|
||||||
gyro_report.z_integral = gyro_val_integ(2);
|
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.x_integral = accel_val_integ(0);
|
||||||
accel_report.y_integral = accel_val_integ(1);
|
accel_report.y_integral = accel_val_integ(1);
|
||||||
accel_report.z_integral = accel_val_integ(2);
|
accel_report.z_integral = accel_val_integ(2);
|
||||||
|
|
||||||
/* TODO return unique hardware ID */
|
|
||||||
accel_report.device_id = 0;
|
|
||||||
|
|
||||||
// TODO: when is this ever blocked?
|
// TODO: when is this ever blocked?
|
||||||
if (!(m_pub_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.y_integral = gyro_val_integ(1);
|
||||||
gyro_report.z_integral = gyro_val_integ(2);
|
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.x_integral = accel_val_integ(0);
|
||||||
accel_report.y_integral = accel_val_integ(1);
|
accel_report.y_integral = accel_val_integ(1);
|
||||||
accel_report.z_integral = accel_val_integ(2);
|
accel_report.z_integral = accel_val_integ(2);
|
||||||
|
|
||||||
/* TODO return unique hardware ID */
|
|
||||||
accel_report.device_id = 0;
|
|
||||||
|
|
||||||
// TODO: when is this ever blocked?
|
// TODO: when is this ever blocked?
|
||||||
if (!(m_pub_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: verify this, it's just copied from the MS5611 driver.
|
||||||
|
|
||||||
/* TODO get device ID for sensor */
|
|
||||||
baro_report.device_id = 0;
|
|
||||||
|
|
||||||
// Constant for now
|
// Constant for now
|
||||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
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: verify this, it's just copied from the MS5611 driver.
|
||||||
|
|
||||||
/* TODO get device ID for sensor */
|
|
||||||
baro_report.device_id = 0;
|
|
||||||
|
|
||||||
// Constant for now
|
// Constant for now
|
||||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user