diff --git a/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp b/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp index 473a53e031e8eb60daf0b0acf12a2725591cca92..f3954e32cb6732e41e94915ca45b5b1007d203c6 100644 --- a/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp +++ b/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp @@ -279,9 +279,9 @@ int DfAK8963Wrapper::_publish(struct mag_sensor_data &data) mag_report.timestamp = hrt_absolute_time(); // TODO: remove these (or get the values) - mag_report.x_raw = NAN; - mag_report.y_raw = NAN; - mag_report.z_raw = NAN; + mag_report.x_raw = 0; + mag_report.y_raw = 0; + mag_report.z_raw = 0; math::Vector<3> mag_val(data.field_x_ga, data.field_y_ga, data.field_z_ga); diff --git a/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp b/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp index f4f2b729805a7c76506012066c2499fe0cc31a59..044f8d7f10190111a42991a2b7ccdfc5b841a9c5 100644 --- a/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp +++ b/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp @@ -278,9 +278,9 @@ int DfHmc9250Wrapper::_publish(struct mag_sensor_data &data) data.field_y_ga = tmp; // TODO: remove these (or get the values) - mag_report.x_raw = NAN; - mag_report.y_raw = NAN; - mag_report.z_raw = NAN; + mag_report.x_raw = 0; + mag_report.y_raw = 0; + mag_report.z_raw = 0; math::Vector<3> mag_val(data.field_x_ga, data.field_y_ga, diff --git a/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp b/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp index 490423f976eca1328094fdef4abfae932f8fda71..fce59a6714036fa504bf3ed8d6bfe95d25291c2c 100644 --- a/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp +++ b/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp @@ -640,18 +640,18 @@ int DfLsm9ds1Wrapper::_publish(struct imu_sensor_data &data) } // TODO: remove these (or get the values) - gyro_report.x_raw = NAN; - gyro_report.y_raw = NAN; - gyro_report.z_raw = NAN; + gyro_report.x_raw = 0; + gyro_report.y_raw = 0; + gyro_report.z_raw = 0; - accel_report.x_raw = NAN; - accel_report.y_raw = NAN; - accel_report.z_raw = NAN; + accel_report.x_raw = 0; + accel_report.y_raw = 0; + accel_report.z_raw = 0; if (_mag_enabled) { - mag_report.x_raw = NAN; - mag_report.y_raw = NAN; - mag_report.z_raw = NAN; + mag_report.x_raw = 0; + mag_report.y_raw = 0; + mag_report.z_raw = 0; } math::Vector<3> gyro_val_filt; diff --git a/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp b/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp index 08fcb50217ff7267b38cffe90d8c53a605cba87a..0c1660e13641678f6b06e81a6f15e8bff3048044 100644 --- a/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp +++ b/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp @@ -501,13 +501,13 @@ int DfMPU6050Wrapper::_publish(struct imu_sensor_data &data) accel_report.device_id = m_id.dev_id; // TODO: remove these (or get the values) - gyro_report.x_raw = NAN; - gyro_report.y_raw = NAN; - gyro_report.z_raw = NAN; + gyro_report.x_raw = 0; + gyro_report.y_raw = 0; + gyro_report.z_raw = 0; - accel_report.x_raw = NAN; - accel_report.y_raw = NAN; - accel_report.z_raw = NAN; + accel_report.x_raw = 0; + accel_report.y_raw = 0; + accel_report.z_raw = 0; math::Vector<3> gyro_val_filt; math::Vector<3> accel_val_filt; diff --git a/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp b/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp index 427633470ad56eea61347b90fd8523a66ef08721..743be5ff2307b4499fa6695321c75bef6beaa140 100644 --- a/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp +++ b/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp @@ -661,18 +661,18 @@ int DfMpu9250Wrapper::_publish(struct imu_sensor_data &data) } // TODO: remove these (or get the values) - gyro_report.x_raw = NAN; - gyro_report.y_raw = NAN; - gyro_report.z_raw = NAN; + gyro_report.x_raw = 0; + gyro_report.y_raw = 0; + gyro_report.z_raw = 0; - accel_report.x_raw = NAN; - accel_report.y_raw = NAN; - accel_report.z_raw = NAN; + accel_report.x_raw = 0; + accel_report.y_raw = 0; + accel_report.z_raw = 0; if (_mag_enabled) { - mag_report.x_raw = NAN; - mag_report.y_raw = NAN; - mag_report.z_raw = NAN; + mag_report.x_raw = 0; + mag_report.y_raw = 0; + mag_report.z_raw = 0; } math::Vector<3> gyro_val_filt;