UAVCAN: preserve original UAVCAN message timestamps

This commit is contained in:
Holger Steinhaus
2014-11-18 14:58:04 +01:00
parent e026324784
commit 2ce2d26d52
4 changed files with 3 additions and 10 deletions
+1 -5
View File
@@ -91,11 +91,7 @@ void UavcanBarometerBridge::air_data_sub_cb(const uavcan::ReceivedDataStructure<
{
auto report = ::baro_report();
report.timestamp = msg.getUtcTimestamp().toUSec();
if (report.timestamp == 0) {
report.timestamp = msg.getMonotonicTimestamp().toUSec();
}
report.timestamp = msg.getMonotonicTimestamp().toUSec();
report.temperature = msg.static_temperature;
report.pressure = msg.static_pressure / 100.0F; // Convert to millibar