-
Notifications
You must be signed in to change notification settings - Fork 0
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
added comments for IMU function headers #13
base: develop
Are you sure you want to change the base?
Conversation
/* | ||
* Function to initialize the Gyro sample rate and give it the base offset value to give | ||
* better calculations in the GetAngleMeasurements function | ||
*/ |
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.
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.
} | ||
|
||
//use the average calculated while getting the samples to give a more accurate offset value |
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.
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."
void InitIMU(void) | ||
{ | ||
InitGyro(); | ||
InitAccelerometer(); | ||
InitGyro(); //initualize the gyro |
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.
See comments above.
/* | ||
* 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. | ||
*/ |
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.
not sure why this went away I'll add it back in
@@ -100,7 +110,7 @@ void InitAccelerometer() | |||
acclOffsetY += fg.y; | |||
acclOffsetZ += (fg.z - 1); | |||
} | |||
|
|||
// Using the offsets sames get the average value to give us a more accurate value |
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.
This sentence doesn't make sense.
} | ||
|
||
// Use the average calculated while getting the samples to give a more accurate offset value |
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.
This sentence doesn't make sense.
added comments on IMU functions