-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fly-By-Wire A Flightmode #33
Conversation
FBWA::FBWA() | ||
{ | ||
//Get PID tuning data from config | ||
config::ControlTuning_t tuningData = config::flightmodes[config::FM_FBWA_IDX].tuningData; |
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.
Is this a reasonable way to get the config data for the appropriate flightmode?
|
||
AttitudeManagerInput FBWA::run(const AttitudeManagerInput& input) { | ||
// Get latest attitude from sensor fusion | ||
SensorFusionOutput currentState = AttitudeManager::getSensorFusionData(); |
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.
Calling this here instead of receiving an argument because some flightmodes don't need sensor fusion.
if(tuningData.PIDValues.pitchPID.isEnabled) | ||
{ | ||
output.pitch = pitchPID_->execute(targetPitch, currentState.pitch); | ||
output.pitch = AttitudeManager::attitudeDegreesToPercent(output.pitch); |
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.
Should I assume AM input/output are percentages while sensor fusion output gives angles in degrees?
8d711ff
to
3660b03
Compare
Closing as old |
Description
What was completed, changed, or updated?
Adding flightmode to attitude manager for Fly-By-Wire A.
Why was this done (if applicable)?
Testing
What manual tests were used to validate the code?
What unit tests were used to validate the code?
Documentation
Milestone number and name:
Link to Asana task:
Link to Confluence documentation:
Reminders
Add reviewers to the PR
Mention the PR in the appropriate discord channel