Browse Source

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 <bapstroman@gmail.com>
sbg
Roman 6 years ago committed by Daniel Agar
parent
commit
e49549a433
  1. 2
      src/drivers/uavcan/actuators/esc.cpp

2
src/drivers/uavcan/actuators/esc.cpp

@ -203,7 +203,7 @@ void UavcanEscController::esc_status_sub_cb(const uavcan::ReceivedDataStructure< @@ -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<int>(_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];

Loading…
Cancel
Save