mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 12:13:33 +08:00
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:
committed by
Daniel Agar
parent
4465c4fbf6
commit
1fa08c3997
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user