diff --git a/Commands/Autonomous/AutoDrive.h b/Commands/Autonomous/AutoDrive.h index 6fa66ef..9ad5286 100644 --- a/Commands/Autonomous/AutoDrive.h +++ b/Commands/Autonomous/AutoDrive.h @@ -6,16 +6,44 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief Drives the robot without a joystick + * + * Drives the robot given a timeout and joystick values + */ class AutoDrive: public Command{ private: double x, y; public: - AutoDrive(double); + /** + * @brief Constructs AutoDrive + * + * @param double Timeout in seconds + * @param double Joystick x value (default: 0.0) + * @param double Joystick y value (default: 0.75) + */ AutoDrive(double, double, double); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Drives the robot + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return True only if the timeout was reached + */ bool IsFinished(); + /** + * @brief Sets the drivetrain to stop + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; #endif diff --git a/Commands/Autonomous/Autonomous.h b/Commands/Autonomous/Autonomous.h index f5786e2..4850c97 100644 --- a/Commands/Autonomous/Autonomous.h +++ b/Commands/Autonomous/Autonomous.h @@ -6,8 +6,27 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief The autonomous period of the robot + * + * Contains three sequences selectable from the SmartDashboard + * All sequences will wait for the SmartDashboard value "Auto Wait Time" + * + * Sequence 0: Used for testing only + * + * Sequence 1: Drives forward "Auto Zone Distance" at -0.8 power + * + * Sequence 2: Collects a tote, turns, then drives to the auto zone + * + * Sequence 3: Collects two or three totes then drives to auto zone + */ class Autonomous: public CommandGroup{ public: + /** + * @brief Constructs Autonomous + * + * @param int The sequence to run + */ Autonomous(int); }; #endif diff --git a/Commands/Autonomous/CollectTote.h b/Commands/Autonomous/CollectTote.h index be6d94e..0d7c013 100644 --- a/Commands/Autonomous/CollectTote.h +++ b/Commands/Autonomous/CollectTote.h @@ -6,8 +6,16 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief Collects one tote + * + * Rolls collector wheels in and drives forward in parallel + */ class CollectTote: public CommandGroup{ public: + /** + * @brief Constructs CollectTote + */ CollectTote(); }; #endif diff --git a/Commands/Autonomous/ReleaseTote.h b/Commands/Autonomous/ReleaseTote.h index df04a04..f91dc65 100644 --- a/Commands/Autonomous/ReleaseTote.h +++ b/Commands/Autonomous/ReleaseTote.h @@ -6,8 +6,16 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief Releases one tote + * + * Rolls collector wheels out and drives backwards in parallel + */ class ReleaseTote: public CommandGroup{ public: + /** + * @brief Constructs ReleaseTote + */ ReleaseTote(); }; #endif diff --git a/Commands/Autonomous/Turn.h b/Commands/Autonomous/Turn.h index 515ce44..3781a0a 100644 --- a/Commands/Autonomous/Turn.h +++ b/Commands/Autonomous/Turn.h @@ -6,15 +6,42 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief Turns the robot + * + * Turns the robot until a timeout is reached + */ class Turn: public Command{ private: int degrees; public: + /** + * @brief Constructs Turn + * + * @param double Timeout in seconds + */ Turn(double); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Turns the robot + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return True only if the timeout was reached + */ bool IsFinished(); + /** + * @brief Sets the drivetrain to stop + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; #endif diff --git a/Commands/BinElevator/BinCloseArms.h b/Commands/BinElevator/BinCloseArms.h index b6322b9..b1fb9db 100644 --- a/Commands/BinElevator/BinCloseArms.h +++ b/Commands/BinElevator/BinCloseArms.h @@ -4,13 +4,38 @@ #include "Commands/Command.h" #include "WPILib.h" +/** + * @brief Closes BinElevatorArms (NOT USED) + * + * Sets the solenoid to close the arms of the BinElevator + */ class BinCloseArms: public Command{ public: + /** + * @brief Constructs BinCloseArms + */ BinCloseArms(); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Sets the solenoid to close the arms + */ void Execute(); + /** + * @brief Returns true to prevent solenoid damage + * + * @return True + */ bool IsFinished(); + /** + * @brief Ends the command + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; diff --git a/Commands/BinElevator/BinLower.h b/Commands/BinElevator/BinLower.h index 49813b0..f9dcb24 100644 --- a/Commands/BinElevator/BinLower.h +++ b/Commands/BinElevator/BinLower.h @@ -4,15 +4,40 @@ #include "Commands/Command.h" #include "WPILib.h" +/** + * @brief Lowers the bin elevator until a timeout is reached + */ class BinLower: public Command{ private: float timeout; public: + /** + * @brief Constructs BinLower + * + * @param float Timeout in seconds + */ BinLower(float); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Lowers the bin elevator at -1.0 power + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return True only if the timeout was reached + */ bool IsFinished(); + /** + * @brief Sets the bin elevator to stop + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; #endif diff --git a/Commands/BinElevator/BinOpenArms.h b/Commands/BinElevator/BinOpenArms.h index 533d71c..4a9c86c 100644 --- a/Commands/BinElevator/BinOpenArms.h +++ b/Commands/BinElevator/BinOpenArms.h @@ -6,13 +6,32 @@ class BinOpenArms: public Command{ public: + /** + * @brief Constructs BinOpenArms + */ BinOpenArms(); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Sets the solenoid to open the arms + */ void Execute(); + /** + * @brief Returns true to prevent solenoid damage + * + * @return True + */ bool IsFinished(); + /** + * @brief Ends the command + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; - #endif // vim: ts=2:sw=2:et diff --git a/Commands/BinElevator/BinRaise.h b/Commands/BinElevator/BinRaise.h index d173430..8eb6932 100644 --- a/Commands/BinElevator/BinRaise.h +++ b/Commands/BinElevator/BinRaise.h @@ -4,17 +4,41 @@ #include "Commands/Command.h" #include "WPILib.h" +/** + * @brief Raises the bin elevator until a timeout is reached + */ class BinRaise: public Command{ private: float timeout; public: + /** + * @brief Constructs BinRaise + * + * @param float Timeout in seconds + */ BinRaise(float); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Raises the bin elevator at 1.0 power + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return True only if the timeout was reached + */ bool IsFinished(); + /** + * @brief Sets the bin elevator to stop + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; - #endif // vim: ts=2:sw=2:et diff --git a/Commands/Collector/RollIn.h b/Commands/Collector/RollIn.h index 25e4924..9c65d76 100644 --- a/Commands/Collector/RollIn.h +++ b/Commands/Collector/RollIn.h @@ -6,17 +6,41 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief Rolls collector motors in until a timeout is reached + */ class RollIn: public Command{ private: double rawSpeed; public: + /** + * @brief Constructs RollIn + * + * @param double Timeout in seconds + */ RollIn(double); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Rolls the four collector motors in + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return True only if the timeout was reached + */ bool IsFinished(); + /** + * @brief Sets the collector to stop + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; - #endif // vim: ts=2:sw=2:et diff --git a/Commands/Collector/RollOut.h b/Commands/Collector/RollOut.h index 7143d07..33eab1d 100644 --- a/Commands/Collector/RollOut.h +++ b/Commands/Collector/RollOut.h @@ -6,15 +6,37 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief Rolls collector motors out until a timeout is reached + */ class RollOut: public Command{ public: + /** + * @brief Constructs RollOut + */ RollOut(); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Rolls the four collector motors out + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return True only if the timeout was reached + */ bool IsFinished(); + /** + * @brief Sets the collector to stop + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; - #endif // vim: ts=2:sw=2:et diff --git a/Commands/Drivetrain/Drive.h b/Commands/Drivetrain/Drive.h index 17e0ab8..cd45188 100644 --- a/Commands/Drivetrain/Drive.h +++ b/Commands/Drivetrain/Drive.h @@ -6,13 +6,38 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief Drives the robot with a joystick + * + * Uses mechanum drive + */ class Drive: public Command{ public: + /** + * @brief Constructs Drive + */ Drive(); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Drives the robot with joysticks from OI + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return False + */ bool IsFinished(); + /** + * @brief Ends the command + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; #endif diff --git a/Commands/Elevator/Lower.h b/Commands/Elevator/Lower.h index 92c8535..8478472 100644 --- a/Commands/Elevator/Lower.h +++ b/Commands/Elevator/Lower.h @@ -4,13 +4,36 @@ #include "Commands/Command.h" #include "WPILib.h" +/** + * @brief Lowers the elevator until a timeout is reached + */ class Lower: public Command{ public: + /** + * @brief Constructs Lower + */ Lower(); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Lowers the elevator at -1.0 power + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return True if the timeout was reached or if the bottom elevator sensor was triggered + */ bool IsFinished(); + /** + * @brief Sets the elevator to stop + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; #endif diff --git a/Commands/Elevator/Raise.h b/Commands/Elevator/Raise.h index b19f470..63cfc70 100644 --- a/Commands/Elevator/Raise.h +++ b/Commands/Elevator/Raise.h @@ -4,15 +4,37 @@ #include "Commands/Command.h" #include "WPILib.h" +/** + * @brief Raises the elevator until a timeout is reached + */ class Raise: public Command{ public: + /** + * @brief Constructs Raise + */ Raise(); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief Raises the elevator at 1.0 power + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return True if the timeout was reached or if the top elevator was triggered or if the middle elevator is triggered + */ bool IsFinished(); + /** + * @brief Sets the elevator to stop + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; - #endif // vim: ts=2:sw=2:et diff --git a/Commands/Test/CheckDrive.h b/Commands/Test/CheckDrive.h index ec76d13..5993405 100644 --- a/Commands/Test/CheckDrive.h +++ b/Commands/Test/CheckDrive.h @@ -6,15 +6,40 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief TODO + */ class CheckDrive: public CommandGroup{ private: int motor; public: + /** + * @brief TODO + * + * @param int + */ CheckDrive(int); + /** + * @brief Initializes the class + */ void Initialize(); + /** + * @brief TODO + */ void Execute(); + /** + * @brief Checks if the command is finished + * + * @return TODO + */ bool IsFinished(); + /** + * @brief TODO + */ void End(); + /** + * @brief Calls End() + */ void Interrupted(); }; #endif diff --git a/Commands/Test/CheckRobot.h b/Commands/Test/CheckRobot.h index d0df68e..c12d6f6 100644 --- a/Commands/Test/CheckRobot.h +++ b/Commands/Test/CheckRobot.h @@ -6,8 +6,14 @@ #include "../../DentRobot.h" #include "WPILib.h" +/** + * @brief TODO + */ class CheckRobot: public CommandGroup{ public: + /** + * @brief TODO + */ CheckRobot(); }; #endif diff --git a/OI.h b/OI.h index 1214378..369ea2b 100644 --- a/OI.h +++ b/OI.h @@ -4,16 +4,45 @@ #include "WPILib.h" #include "Commands/Command.h" +/** + * @brief Controls the robot with joysticks + */ class OI { private: Joystick *leftStick, *rightStick; public: + /** + * @brief Constructs OI + */ OI(); - Command *raise, *lower, *binLower, *binRaise; + Command *raise, //!< Raise command + *lower, //!< Lower command + *binLower, //!< BinLower command + *binRaise; //!< BinRaise command + /** + * @brief Returns the right joystick + * + * @return The right joystick + */ Joystick* GetRightStick(); + /** + * @brief Returns the left joystick + * + * @return The left joystick + */ Joystick* GetLeftStick(); + /** + * @brief Returns the left joystick throttle + * + * @return The left joystick throttle + */ double GetLeftThrottle(); + /** + * @brief Returns the right joystick throttle + * + * @return The right joystick throttle + */ double GetRightThrottle(); }; #endif