Fix actuator controls timestamps for MAV_CMD_DO_SET_ACTUATOR

Fix actuator controls timestamps for MAV_CMD_DO_SET_ACTUATOR
This commit is contained in:
Jaeyoung-Lim
2021-03-07 20:31:24 -05:00
committed by Daniel Agar
parent 4465c4fbf6
commit 1fa08c3997
+2 -2
View File
@@ -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)) {