1 #ifndef _DRIVEWITHJOYSTICK_HG_ 3 #define _DRIVEWITHJOYSTICK_HG_ 5 #include <frc/commands/Command.h> 8 #include <frc/GenericHID.h> 47 #endif // _DRIVEWITHJOYSTICK_HG_
int directionMultiplier
Can be 1 or -1. Determines the direction the the robot moves in.
frc::XboxController * pJoyDrive
A mnemonic for the driver's controller because we are lazy.
void Initialize() override
Runs once on initalization.
DriveWithJoystick()
Class constructor.
bool getTriggers()
Called only if the drivemode is set to 1.
void End() override
Runs once when IsFinished() returns true.
double radial
radial value that will be passed into DriveTrain::RadialDrive
void Interrupted() override
Runs once if the command is forced to stop.
int driveMode
Used to keep track of the drive mode.
An interface command for driving the robot with an xbox controller.
double magnitude
magnitude value that will be passed into DriveTrain::RadialDrive
double magnitudeMultiplier
The magnitude of the robot is multiplied by this number. Used for slowmode.
bool IsFinished() override
void Execute() override
Called in a loop during Teleop.