From 1fa08c399728667a863d45e6d083242c47ba195c Mon Sep 17 00:00:00 2001 From: Jaeyoung-Lim Date: Sun, 7 Mar 2021 23:11:10 +0100 Subject: [PATCH] Fix actuator controls timestamps for MAV_CMD_DO_SET_ACTUATOR Fix actuator controls timestamps for MAV_CMD_DO_SET_ACTUATOR --- src/modules/mavlink/mavlink_receiver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 01d201704a..9180d00efe 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -506,11 +506,11 @@ void MavlinkReceiver::handle_message_command_both(mavlink_message_t *msg, const // index should be 0, otherwise ignore the message if (((int) vehicle_command.param7) == 0) { actuator_controls_s actuator_controls{}; - actuator_controls.timestamp = hrt_absolute_time(); - // update with existing values to avoid changing unspecified controls _actuator_controls_3_sub.update(&actuator_controls); + actuator_controls.timestamp = hrt_absolute_time(); + bool updated = false; if (PX4_ISFINITE(vehicle_command.param1)) {