sensor_combined.msg: make timestamps relative

This is needed for the new logger & saves some space as well.
This commit is contained in:
Beat Küng
2016-07-07 11:35:50 +02:00
committed by Lorenz Meier
parent c66f26245c
commit c5ea4b43be
12 changed files with 94 additions and 53 deletions
+6 -6
View File
@@ -1642,18 +1642,18 @@ int sdlog2_thread_main(int argc, char *argv[])
write_IMU = true;
}
if (buf.sensor.accelerometer_timestamp != accelerometer_timestamp) {
accelerometer_timestamp = buf.sensor.accelerometer_timestamp;
if (buf.sensor.timestamp + buf.sensor.accelerometer_timestamp_relative != accelerometer_timestamp) {
accelerometer_timestamp = buf.sensor.timestamp + buf.sensor.accelerometer_timestamp_relative;
write_IMU = true;
}
if (buf.sensor.magnetometer_timestamp != magnetometer_timestamp) {
magnetometer_timestamp = buf.sensor.magnetometer_timestamp;
if (buf.sensor.timestamp + buf.sensor.magnetometer_timestamp_relative != magnetometer_timestamp) {
magnetometer_timestamp = buf.sensor.timestamp + buf.sensor.magnetometer_timestamp_relative;
write_IMU = true;
}
if (buf.sensor.baro_timestamp != barometer_timestamp) {
barometer_timestamp = buf.sensor.baro_timestamp;
if (buf.sensor.timestamp + buf.sensor.baro_timestamp_relative != barometer_timestamp) {
barometer_timestamp = buf.sensor.timestamp + buf.sensor.baro_timestamp_relative;
write_SENS = true;
}