Skip to content
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

Fix radius reset when editing FW Landing Patterns #12544

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rubenp02
Copy link
Contributor

@rubenp02 rubenp02 commented Mar 8, 2025

Fix radius reset when editing FW Landing Patterns

Description

Resolved an issue where the loiter radius of a fixed-wing Landing Pattern would revert back to its default value when starting to edit the mission item.

Checklist:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Resolved an issue where the loiter radius of a fixed-wing Landing
Pattern would revert back to its default value when starting to edit the
mission item.
} else {
missionItem.loiterRadius.rawValue = missionItem.loiterRadius.defaultValue
}
// Restore the previous loiter radius
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. If the item starts without loiter to altitude off. Then the previous loiter radius is 0. Then the user decides they want to use loiter to alt. The old code would set the radius to the default when they turned it on. Now it stays at 0. What's the exact sequence of events which cause the problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I'll fix it when I can.

The sequence of events this PR fixes is:

  1. Load a flight plan with a Landing Sequence that uses a non-default loiter radius.
  2. Click/tap the Landing Sequence to start the editor.
  3. The loiter radius will have gone back to the default value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok. The way I've tended to handle stuff like in the past is like this:

property bool _initialLoadComplete: false
Component.onCompleted: _initialLoadComplete = true
...
if (_initialLoadComplete) {
   // do stuff which should only happen after the initial loads finishes all the signalling it might cause
}
'''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants