Enable offboard actuator setpoints

This commit is contained in:
JaeyoungLim 2021-11-07 21:38:42 +01:00 committed by GitHub
parent 47a191489e
commit cda7c6ceaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -7,3 +7,4 @@ bool velocity
bool acceleration
bool attitude
bool body_rate
bool actuator

View File

@ -4066,12 +4066,13 @@ Commander::offboard_control_update()
old.velocity != ocm.velocity ||
old.acceleration != ocm.acceleration ||
old.attitude != ocm.attitude ||
old.body_rate != ocm.body_rate) {
old.body_rate != ocm.body_rate ||
old.actuator != ocm.actuator) {
_status_changed = true;
}
if (ocm.position || ocm.velocity || ocm.acceleration || ocm.attitude || ocm.body_rate) {
if (ocm.position || ocm.velocity || ocm.acceleration || ocm.attitude || ocm.body_rate || ocm.actuator) {
offboard_available = true;
}
}

View File

@ -1271,6 +1271,7 @@ MavlinkReceiver::handle_message_set_actuator_control_target(mavlink_message_t *m
//bool ignore_setpoints = bool(actuator_target.group_mlx != 2);
offboard_control_mode_s offboard_control_mode{};
offboard_control_mode.actuator = true;
offboard_control_mode.timestamp = hrt_absolute_time();
_offboard_control_mode_pub.publish(offboard_control_mode);