Fix RTH hover above home - #3332
Merged
Merged
Conversation
Collaborator
Author
|
Tested on FW, RTH loiter around home is now working as intended. Ready to merge. |
Member
|
Maybe it's better to fix HOVER_PRIOR_TO_LANDING state? |
Collaborator
Author
|
@digitalentity I chose this way for these reasons:
|
Member
|
@shellixyz good point, agreed |
digitalentity
approved these changes
Jun 8, 2018
fiam
reviewed
Jun 9, 2018
| if (STATE(FIXED_WING)) | ||
| return OSD_MESSAGE_STR("LOITERING AROUND HOME"); | ||
| else | ||
| return OSD_MESSAGE_STR("HOVERING"); |
Member
There was a problem hiding this comment.
Could you drop the else and add braces in the if?
Collaborator
Author
There was a problem hiding this comment.
Drop the else ? Why ?
Member
There was a problem hiding this comment.
Drop the else, not its contents :-). Something like...
+if (STATE(FIXED_WING)) {
+ return OSD_MESSAGE_STR("LOITERING AROUND HOME");
+}
+return OSD_MESSAGE_STR("HOVERING");
The state machine was switching to NAV_STATE_RTH_LANDING even when landing was not allowed which made the throttle during hover unable to go over cruise throttle impeding the ability of the craft to stay at the target altitude.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The state machine was switching to NAV_STATE_RTH_LANDING even when landing was not allowed which made the throttle during hover unable to go over cruise throttle impeding the ability of the craft to stay at the target altitude.
Don't merge yet I need to test this fix.