-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 RTH hover above home #3332
Fix RTH hover above home #3332
Conversation
Tested on FW, RTH loiter around home is now working as intended. Ready to merge. |
Maybe it's better to fix HOVER_PRIOR_TO_LANDING state? |
@digitalentity I chose this way for these reasons:
|
@shellixyz good point, agreed |
src/main/io/osd.c
Outdated
if (STATE(FIXED_WING)) | ||
return OSD_MESSAGE_STR("LOITERING AROUND HOME"); | ||
else | ||
return OSD_MESSAGE_STR("HOVERING"); |
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.
Could you drop the else and add braces in the if?
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.
Drop the else ? Why ?
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.
Drop the else, not its contents :-). Something like...
+if (STATE(FIXED_WING)) {
+ return OSD_MESSAGE_STR("LOITERING AROUND HOME");
+}
+return OSD_MESSAGE_STR("HOVERING");
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.
Oh ok 👍. Done
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.
Thanks!
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.
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.