-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
ArduPlane: Add RTL_RADIUS and RTL_AUTOLAND to Flight Safety page #14243
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
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 | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -126,6 +126,23 @@ | |||||||
| "label": "Return altitude", | ||||||||
| "optional": true, | ||||||||
| "enableWhen": "_planeRtlAltFact && _planeRtlAltFact.value >= 0" | ||||||||
| }, | ||||||||
| { | ||||||||
| "param": "RTL_RADIUS", | ||||||||
| "label": "Loiter radius", | ||||||||
| "optional": true | ||||||||
| }, | ||||||||
| { | ||||||||
| "control": "label", | ||||||||
| "label": "0 = use Waypoint Loiter Radius (WP_LOITER_RAD), negative = counter-clockwise", | ||||||||
| "indent": true, | ||||||||
| "smallFont": true | ||||||||
|
||||||||
| "smallFont": true | |
| "smallFont": true, | |
| "showWhen": "controller.parameterExists(-1, 'RTL_RADIUS')" |
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.
Same reasoning — the label is tied to the RTL_RADIUS control which will always exist on ArduPlane.
Copilot
AI
Mar 30, 2026
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.
RTL_AUTOLAND is marked optional but has no showWhen/enableWhen guard. If the param is missing, the generated combobox may still be focusable/clickable while its fact is null, which can trigger QML runtime errors on activation. Consider gating visibility/enabled state on controller.parameterExists(-1, "RTL_AUTOLAND") (or an equivalent fact-exists binding).
| "control": "combobox" | |
| "control": "combobox", | |
| "showWhen": "controller.parameterExists(-1, \"RTL_AUTOLAND\")" |
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.
Same reasoning as above — consistent with existing pattern.
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.
RTL_RADIUSis marked optional but the control has noshowWhen/enableWhenguard. If the param is missing on a given firmware version,getParameterFact(..., false)will yield null and the generatedLabelledFactTextFieldcan still be interactive, leading to runtime errors when editing finishes. Consider adding a guard based oncontroller.parameterExists(-1, "RTL_RADIUS")(or a fact-exists binding) to hide/disable this control when the parameter is unavailable.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.
The existing
RTL_ALTITUDEentries in this same section useoptional: truewithout anyparameterExistsguard. These are standard ArduPlane params present in all firmware versions —optionalis just a defensive pattern matching surrounding code. AddingshowWhenonly to the new entries would be inconsistent.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.
The existing
RTL_ALTITUDEentries in this same section useoptional: truewithout anyparameterExistsguard. These are standard ArduPlane params present in all firmware versions —optionalis just a defensive pattern matching surrounding code. AddingshowWhenonly to the new entries would be inconsistent.