Skip to content

Latest commit

 

History

History
113 lines (100 loc) · 2.45 KB

CodeDocumentation.md

File metadata and controls

113 lines (100 loc) · 2.45 KB

Code Documentation Guidelines

Programmers, use this concise guide to help you quickly comment your code!

Files

/**
 * @file     ExampleFile.c
 * @brief    Description stating the purpose of the file.
 *
 * @author   FirstName LastName   687_   example@gmail.com
 * @author   FirstName LastName   687_   example@gmail.com
 *
**/

Sections

/////////////////////////////////////////////////////////////////////////////////////////
//
//                               Section Name
//
/////////////////////////////////////////////////////////////////////////////////////////

Functions

/**
 * Description about what the function does
 * and any notes for other developers.
 *
 * @param  parameterName  parameter description goes here
 * @param  parameterName  parameter description goes here
 *
**/
void forward(int ticks, int speed=80) { ... }

In-Line Comment

// describe a line or group of lines here

One-Line Comment

/* one line comment of text */

Half-Line Comment

 [insert code] // half-line comment

Other Comment Commands

  • @warning warning for other developers
  • @bug bugs in the program that need to be fixed
  • @details more indepth description
  • @todo something that needs to be done
  • etc...

Drivetrains

Standard Drivetrain/Skid Steer Drive Configuration

/** Drive used: Standard Drivetrain/Skid-Steer-Drive
 *   Skid-Steer-Drive configuration:
 *     FL              FR 
 *    XXXX            XXXX
 *    XXXX            XXXX
 *    XXXX            XXXX
 *    XXXXXXXXXXXXXXXXXXXX
 *    XXXXXXXXXXXXXXXXXXXX
 *    XXXX            XXXX
 *    XXXX            XXXX
 *     BL              BR 
*/

H-Drive Configuration

/** Drive used: H-Drive
 *   H-Drive configuration:
 *     FL              FR 
 *    XXXX            XXXX
 *    XXXX            XXXX
 *    XXXX            XXXX
 *    XXXXXXX  MW  XXXXXXX
 *    XXXXXXXXXXXXXXXXXXXX
 *    XXXX            XXXX
 *    XXXX            XXXX
 *     BL              BR 
*/

Holonomic Drive/X-Drive Configuration

/** Drive used: Holonomic Drive/X-Drive
 *   X-drive configuration:
 *        X FRONT X
 *      X           X
 *    X  FL       FR  X
 *            X
 *           AXIS
 *            X
 *    X  BL       BR  X
 *      X           X
 *        X  BACK  X
**/

Controller Map

Programmers, refer to this when programming driver-based control! Controller Map