Skip to content

Commit 8d864f6

Browse files
committed
Enable offboard actuator setpoints
1 parent 1469342 commit 8d864f6

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

msg/offboard_control_mode.msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ bool velocity
77
bool acceleration
88
bool attitude
99
bool body_rate
10+
bool actuator

src/modules/commander/Commander.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3903,12 +3903,13 @@ Commander::offboard_control_update()
39033903
old.velocity != ocm.velocity ||
39043904
old.acceleration != ocm.acceleration ||
39053905
old.attitude != ocm.attitude ||
3906-
old.body_rate != ocm.body_rate) {
3906+
old.body_rate != ocm.body_rate ||
3907+
old.actuator != ocm.actuator) {
39073908

39083909
_status_changed = true;
39093910
}
39103911

3911-
if (ocm.position || ocm.velocity || ocm.acceleration || ocm.attitude || ocm.body_rate) {
3912+
if (ocm.position || ocm.velocity || ocm.acceleration || ocm.attitude || ocm.body_rate || ocm.actuator) {
39123913
offboard_available = true;
39133914
}
39143915
}

src/modules/mavlink/mavlink_receiver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,7 @@ MavlinkReceiver::handle_message_set_actuator_control_target(mavlink_message_t *m
11441144
//bool ignore_setpoints = bool(actuator_target.group_mlx != 2);
11451145

11461146
offboard_control_mode_s offboard_control_mode{};
1147+
offboard_control_mode.actuator = true;
11471148
offboard_control_mode.timestamp = hrt_absolute_time();
11481149
_offboard_control_mode_pub.publish(offboard_control_mode);
11491150

0 commit comments

Comments
 (0)