Made changes to have actuator controls mirror other syntax more closely

This commit is contained in:
Matt Beall
2015-02-25 11:54:41 -07:00
committed by Thomas Gubler
parent 7d6723aa2d
commit b8aa79cae4

View File

@@ -690,7 +690,13 @@ MavlinkReceiver::handle_message_set_actuator_control_target(mavlink_message_t *m
for(size_t i = 0; i < 8 ; i++){
actuator_controls.control[i] = set_actuator_control_target.controls[i];
}
_actuator_controls_pub = orb_advertise(ORB_ID(actuator_controls_0), &actuator_controls);
if (_offboard_control_mode_pub < 0) {
_actuator_controls_pub = orb_advertise(ORB_ID(actuator_controls_0), &actuator_controls);
} else {
orb_publish(ORB_ID(actuator_controls_0), _actuator_controls_pub, &actuator_controls);
}
}
}