Code Standards - tysuh66/FtcRobotController GitHub Wiki

Coding Standards

Casing

Class - PascalCase
Constants - MACRO_CASE
Functions - camelCase
Global Variables - camelCase
Local Variables - camelCase

Comments

Javadocs will be used for class and function comments.

Function Comment:

/**
* Describe the method
* Second line describing method
* @param numA Describe param by this name
* @param numB Describe another param
* @return int This returns something
*/

Class Comment:

/**
* Class description
* additional info
*/

Additional Comments:

Only use comments to explain a complicated line of code or something likely to cause confusion.

Put comments before the line or section of code you wish to describe. Use a space before the comment and capitalize the first word. Do not add periods to the end of the comments. Make additional comment lines as necessary.

// Gets a smoothed input that is in the correct direction
double smoothedInput = (-input/10)*smoother;