From e49549a43398312a65f00f951ca9d82b634e0638 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 30 Jan 2019 11:34:21 +0100 Subject: [PATCH] uavcan: use px4 timestamp for the esc status message - there is a timeshift between the esc and px4 time so until there is some kind of offset estimation we are better off using px4 time since the logging system uses that as reference Signed-off-by: Roman --- src/drivers/uavcan/actuators/esc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/uavcan/actuators/esc.cpp b/src/drivers/uavcan/actuators/esc.cpp index 8ada8d6b2e..2fbc670a63 100644 --- a/src/drivers/uavcan/actuators/esc.cpp +++ b/src/drivers/uavcan/actuators/esc.cpp @@ -203,7 +203,7 @@ void UavcanEscController::esc_status_sub_cb(const uavcan::ReceivedDataStructure< { if (msg.esc_index < esc_status_s::CONNECTED_ESC_MAX) { _esc_status.esc_count = uavcan::max(_esc_status.esc_count, msg.esc_index + 1); - _esc_status.timestamp = msg.getMonotonicTimestamp().toUSec(); + _esc_status.timestamp = hrt_absolute_time(); auto &ref = _esc_status.esc[msg.esc_index];