add timestamp field to uORB msgs; sync timestamp whenever possible

This commit is contained in:
TSC21
2018-08-09 13:40:48 +02:00
committed by Beat Küng
parent 4a08003952
commit e932030d88
111 changed files with 203 additions and 87 deletions
+3 -3
View File
@@ -3484,7 +3484,7 @@ protected:
if (_debug_sub->update(&_debug_time, &debug)) {
mavlink_named_value_float_t msg = {};
msg.time_boot_ms = debug.timestamp_ms;
msg.time_boot_ms = debug.timestamp * 1e-3f;
memcpy(msg.name, debug.key, sizeof(msg.name));
/* enforce null termination */
msg.name[sizeof(msg.name) - 1] = '\0';
@@ -3553,7 +3553,7 @@ protected:
if (_debug_sub->update(&_debug_time, &debug)) {
mavlink_debug_t msg = {};
msg.time_boot_ms = debug.timestamp_ms;
msg.time_boot_ms = debug.timestamp * 1e-3f;
msg.ind = debug.ind;
msg.value = debug.value;
@@ -3620,7 +3620,7 @@ protected:
if (_debug_sub->update(&_debug_time, &debug)) {
mavlink_debug_vect_t msg = {};
msg.time_usec = debug.timestamp_us;
msg.time_usec = debug.timestamp;
memcpy(msg.name, debug.name, sizeof(msg.name));
/* enforce null termination */
msg.name[sizeof(msg.name) - 1] = '\0';