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

added comments for IMU function headers #13

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

sayoung388
Copy link
Collaborator

added comments on IMU functions

/*
* Function to initialize the Gyro sample rate and give it the base offset value to give
* better calculations in the GetAngleMeasurements function
*/
Copy link
Owner

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
Copy link
Owner

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.

  1. One space between "//" and the first letter of the sentence.
  2. 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
Copy link
Owner

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.
*/
Copy link
Collaborator Author

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
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants