Team-OKC-Robotics / FRC-2022-CPP

a c++ port of our FRC-2022 code as training in C++
Other
0 stars 2 forks source link

Document drivetrain code #14

Open jkleiber opened 1 year ago

jkleiber commented 1 year ago

Summary It would be good to know what our code does. The C++ code currently has little/no docstrings for each function.

The objective of this ticket is to add docstrings to the header files of the drivetrain code. This includes Drivetrain.h and DrivetrainIO.h. In each header file, each function should have a docstring that looks like this:

/**
 * Summary of what this function does
 *
 * @param arg1 Description of arg1
 * @param arg2 Description of arg2
 * ...
 * @param argN Description of argN
 * @return Description of what returns (and in some cases why)
 */
return_type function_name(data_type arg1, data_type arg2, ..., data_type argN);

So for example:

/**
 * Sets the speed modifier variable used to scale the power of user input.
 * 
 * @param speed_mod New speed modifier to set
 * @return True on success, false on failure
 */
bool SetSpeedModifier(const double &speed_mod);

Work To Do

Verification

Deferred Work