sensor_combined.msg: use uint32 for integral_dt

There is no reason to make this 64 bit. The same should be done in
the sensor raw messages, together with further cleanup.
This commit is contained in:
Beat Küng
2016-07-07 11:35:50 +02:00
committed by Lorenz Meier
parent 30301187f0
commit c66f26245c
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -1076,7 +1076,7 @@ Sensors::accel_poll(struct sensor_combined_s &raw)
_last_sensor_data[i].accelerometer_integral_m_s[1] = vect_int(1);
_last_sensor_data[i].accelerometer_integral_m_s[2] = vect_int(2);
_last_sensor_data[i].accelerometer_integral_dt = accel_report.integral_dt;
_last_sensor_data[i].accelerometer_integral_dt = (uint32_t)accel_report.integral_dt;
float dt = accel_report.integral_dt / 1.e6f;
sensor_value = vect_int / dt;
@@ -1093,7 +1093,7 @@ Sensors::accel_poll(struct sensor_combined_s &raw)
}
_last_sensor_data[i].accelerometer_integral_dt =
accel_report.timestamp - _last_sensor_data[i].accelerometer_timestamp;
(uint32_t)(accel_report.timestamp - _last_sensor_data[i].accelerometer_timestamp);
float dt = _last_sensor_data[i].accelerometer_integral_dt / 1.e6f;
_last_sensor_data[i].accelerometer_integral_m_s[0] = vect_val(0) * dt;
_last_sensor_data[i].accelerometer_integral_m_s[1] = vect_val(1) * dt;
@@ -1149,7 +1149,7 @@ Sensors::gyro_poll(struct sensor_combined_s &raw)
_last_sensor_data[i].gyro_integral_rad[1] = vect_int(1);
_last_sensor_data[i].gyro_integral_rad[2] = vect_int(2);
_last_sensor_data[i].gyro_integral_dt = gyro_report.integral_dt;
_last_sensor_data[i].gyro_integral_dt = (uint32_t)gyro_report.integral_dt;
float dt = gyro_report.integral_dt / 1.e6f;
sensor_value = vect_int / dt;
@@ -1166,7 +1166,7 @@ Sensors::gyro_poll(struct sensor_combined_s &raw)
}
_last_sensor_data[i].gyro_integral_dt =
gyro_report.timestamp - _last_sensor_data[i].timestamp;
(uint32_t)(gyro_report.timestamp - _last_sensor_data[i].timestamp);
float dt = _last_sensor_data[i].gyro_integral_dt / 1.e6f;
_last_sensor_data[i].gyro_integral_rad[0] = vect_val(0) * dt;
_last_sensor_data[i].gyro_integral_rad[1] = vect_val(1) * dt;