mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-15 12:51:35 +08:00
add timestamp field to uORB msgs; sync timestamp whenever possible
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user