-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft] Fix SITL offboard attitude for VTOL_TYPE_RESERVED2 #13122
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1397,6 +1397,7 @@ MavlinkReceiver::handle_message_set_attitude_target(mavlink_message_t *msg) | |
case MAV_TYPE_OCTOROTOR: | ||
case MAV_TYPE_TRICOPTER: | ||
case MAV_TYPE_HELICOPTER: | ||
case MAV_TYPE_VTOL_RESERVED2: | ||
att_sp.thrust_body[2] = -set_attitude_target.thrust; | ||
Comment on lines
+1400
to
1401
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will work only in MC mode, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now checked and filling in true |
||
break; | ||
|
||
|
@@ -1406,7 +1407,15 @@ MavlinkReceiver::handle_message_set_attitude_target(mavlink_message_t *msg) | |
} | ||
} | ||
|
||
_att_sp_pub.publish(att_sp); | ||
switch (_mavlink->get_system_type()) { | ||
case MAV_TYPE_VTOL_RESERVED2: | ||
_virt_att_sp_pub.publish(att_sp); | ||
break; | ||
|
||
default: | ||
_att_sp_pub.publish(att_sp); | ||
break; | ||
} | ||
} | ||
|
||
/* Publish attitude rate setpoint if bodyrate and thrust ignore bits are not set */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this specific only for this VTOL type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how thrust is handled in the other VTOL types, so I preferred to leave it blank for those types. I only work on quadplanes.
Also, my newly added
switch
on lines 1410-1417 eventually needs to be updated with the other VTOL types (preferably by someone who knows the other types, not that I make a stupid mistake)