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 and simplify applyFixedWingPitchRollThrottleController() #3297

Conversation

Projects
None yet
3 participants
@shellixyz
Copy link
Collaborator

commented May 30, 2018

Should only control pitch and throttle when nav stateFlags & NAV_CTL_ALT
Needed for upcoming CRUISE 2D mode

Fix and simplify applyFixedWingPitchRollThrottleController()
Should only control pitch and throttle when nav stateFlags & NAV_CTL_ALT
Needed for upcoming CRUISE 2D mode
rollCorrection = constrain(rollCorrection, -DEGREES_TO_DECIDEGREES(navConfig()->fw.max_bank_angle), DEGREES_TO_DECIDEGREES(navConfig()->fw.max_bank_angle));
rcCommand[ROLL] = pidAngleToRcCommand(rollCorrection, pidProfile()->max_angle_inclination[FD_ROLL]);
}
// Speed controller - only apply in POS mode when NOT NAV_CTL_LAND

This comment has been minimized.

Copy link
@digitalentity

digitalentity May 31, 2018

Member

Now this is applied only if both ALT and POS controllers are active, while previously speed guard only required POS which is reasonable. Why change?

This comment has been minimized.

Copy link
@shellixyz

shellixyz May 31, 2018

Author Collaborator

For the moment all nav states using POS also use ALT so it won't change anything for those but for cruise 2D we need manual throttle control (no ALT) and we can't have both manual throttle control and min speed applied.

This comment has been minimized.

Copy link
@digitalentity

digitalentity May 31, 2018

Member

Ok, you convinced me 😄

@digitalentity digitalentity added this to the 2.0 milestone May 31, 2018

@fiam fiam merged commit 99cbb3f into iNavFlight:development Jun 11, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.