Open
Conversation
| /* | ||
| * Function to initialize the Gyro sample rate and give it the base offset value to give | ||
| * better calculations in the GetAngleMeasurements function | ||
| */ |
Owner
There was a problem hiding this comment.
Please align the '' characters like seen elsewhere. Also, the spaces between the '' characters and the first letter are way to long. Please, only one space.
src/main.cpp
Outdated
| gyroOffsetY += gyro.getGyroY(); | ||
| } | ||
|
|
||
| //use the average calculated while getting the samples to give a more accurate offset value |
Owner
There was a problem hiding this comment.
Please follow spec with the rest of the comments.
- One space between "//" and the first letter of the sentence.
- Capitalize the first letter in the sentence.
Also, this doesn't make any sense.. "Use the average calculated..." The average calculated what? I suggest just writing something like, "Use the running average to calculate the offset."
src/main.cpp
Outdated
| { | ||
| InitGyro(); | ||
| InitAccelerometer(); | ||
| InitGyro(); //initualize the gyro |
| /* | ||
| * Updates the PID inputs and outputs. This function is called every iteration | ||
| * of the main control loop, but PID is only updated at a 100Hz rate. | ||
| */ |
Collaborator
Author
There was a problem hiding this comment.
not sure why this went away I'll add it back in
src/main.cpp
Outdated
| acclOffsetZ += (fg.z - 1); | ||
| } | ||
|
|
||
| // Using the offsets sames get the average value to give us a more accurate value |
Owner
There was a problem hiding this comment.
This sentence doesn't make sense.
src/main.cpp
Outdated
| gyroOffsetY += gyro.getGyroY(); | ||
| } | ||
|
|
||
| // Use the average calculated while getting the samples to give a more accurate offset value |
Owner
There was a problem hiding this comment.
This sentence doesn't make sense.
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 comments on IMU functions