Closed
Conversation
…fs-zeropilot-3.5b into feature/am/PID updated PID controller to use the up to date rudder mixing code
Var names, formatting, file names, etc.
Keeping pid calc files separate to allow general use of pid.
- Corrected mistake in accidentally clamping absolute position (pid_output) instead of pid_control_effort. - Added some comments.
avancruy
reviewed
Jul 10, 2025
| outputToMotor(THROTTLE, motorOutputs.throttle); | ||
| outputToMotor(FLAP_ANGLE, motorOutputs.flapAngle); | ||
| outputToMotor(STEERING, motorOutputs.yaw); | ||
| signedYaw = motorOutputs.roll-50; |
Contributor
There was a problem hiding this comment.
seems to be only used here, maybe better as local variable?
Contributor
Author
There was a problem hiding this comment.
Issue with constructor (?) tryna fix.
- Fixed lint check's case style errors - Made rollPID & pitchPID into ptrs and added ptr stuff wherever they're used.
- Removed redundant vars for roll & pitch i.e. PID consts and tau. Note: tau is updated in an alg. whenever KD is. - Fixed constructor for roll and pitch PID. - Linked setters for roll & pitch to setter in pid class. - Added destructors.
avancruy
reviewed
Jul 17, 2025
avancruy
reviewed
Jul 17, 2025
SuperMK15
requested changes
Jul 27, 2025
Contributor
SuperMK15
left a comment
There was a problem hiding this comment.
Great work! Left some minor comments.
- Integral calculation in pid.cpp was missing multiplication with time. Corrected now. - Removed dynamic alloc - Changed file names to correct misspelling (lol) - Changed class names for clarity - Moved function bodies to .cpp files - Roll integral, pitch integral, and output limits changed to const static var - Added noexcept keyword to some functions that don't throw exceptions for optimization.
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.
Added AM_pid header and source and pid_mapping header and source files. Left actual values like integral limits, output limits and PID constants as placeholder values for now.