[xrp] Copy XRPReference docs from Java to C++ (NFC) (#7388)

This commit is contained in:
Kavin Muralikrishnan
2024-11-16 10:24:21 -05:00
committed by GitHub
parent fff73ee6e1
commit 6eb652e10e
8 changed files with 71 additions and 6 deletions

View File

@@ -13,6 +13,14 @@
class TurnDegrees : public frc2::CommandHelper<frc2::Command, TurnDegrees> {
public:
/**
* Creates a new TurnDegrees. This command will turn your robot for a desired
* rotation (in degrees) and rotational speed.
*
* @param speed The speed which the robot will drive. Negative is in reverse.
* @param angle Degrees to turn. Leverages encoders to compare distance.
* @param drive The drive subsystem on which this command will run
*/
TurnDegrees(double speed, units::degree_t angle, Drivetrain* drive)
: m_speed(speed), m_angle(angle), m_drive(drive) {
AddRequirements(m_drive);