Skip to content

added comments for IMU function headers#13

Open
sayoung388 wants to merge 13 commits intodevelopfrom
imu-comments-functions
Open

added comments for IMU function headers#13
sayoung388 wants to merge 13 commits intodevelopfrom
imu-comments-functions

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.

src/main.cpp Outdated
gyroOffsetY += gyro.getGyroY();
}

//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."

src/main.cpp Outdated
{
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

src/main.cpp Outdated
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.

src/main.cpp Outdated
gyroOffsetY += gyro.getGyroY();
}

// 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