From 60343cc168ad9c820eb0ebcae32cce62489caa75 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 6 Nov 2019 17:15:29 +0100 Subject: [PATCH] mavlink: warning for actuator offboard & lockstep Currently actuator offboard control interferes with SITL lockstep. Therefore, the least we can do is to warn a user and inform them how to workaround the issue. --- src/modules/mavlink/mavlink_receiver.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 25519ef74a..662a8c80f9 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -1102,6 +1102,12 @@ MavlinkReceiver::handle_message_set_actuator_control_target(mavlink_message_t *m set_actuator_control_target.target_component == 0) && values_finite) { +#if defined(ENABLE_LOCKSTEP_SCHEDULER) + PX4_ERR("SET_ACTUATOR_CONTROL_TARGET not supported with lockstep enabled"); + PX4_ERR("Please disable lockstep for actuator offboard control:"); + PX4_ERR("https://dev.px4.io/master/en/simulation/#disable-lockstep-simulation"); + return; +#endif /* Ignore all setpoints except when controlling the gimbal(group_mlx==2) as we are setting raw actuators here */ bool ignore_setpoints = bool(set_actuator_control_target.group_mlx != 2);