-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Copter: GCS_MAVLink: populate flags using position controller active flags #28131
Copter: GCS_MAVLink: populate flags using position controller active flags #28131
Conversation
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 like this change.
case Mode::Number::POSHOLD: | ||
case Mode::Number::BRAKE: | ||
case Mode::Number::SMART_RTL: | ||
if ((copter.pos_control != nullptr) && copter.pos_control->is_active_xy()) { | ||
_base_mode |= MAV_MODE_FLAG_GUIDED_ENABLED; |
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.
This makes our answer here marginally worse.
My reading of that attribute is we should only set it actually chasing a waypoints "flies waypoints / mission items".
Not a blocker, but we really should cut this down to AUTO, AUTO_RTL, RTL and SMART_RTL at some stage.
…ethods for XY and Z flags
…` `GUIDED_ENABLED` flag
1269765
to
2143070
Compare
I have rebased, I tested the auto mode case when disarmed or armed but waiting for high throttle in both cases both XY and Z control are active. However, I can't guarantee that this is the same in every combination of mode and submode. If we wanted identical behavior then this could be a per mode function call. |
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.
This is probably OK but we decided that a bit of testing with MP and QGC is warranted. At least a grep through MP/QGC to see if they use the flag at all
I have grepped QGC, there are no users of these bits there either. |
This means we don't need to switch on the mode number, extracted from #28110
This is the first time we will be using these flags for reporting, until now it is used internally only. There are some changes in behaviour, for example you can be landed in auto mode in which case the pos controller may not report as active (i need to check).