DeepSpace
2019
|
An interface command for driving the robot with an xbox controller. More...
#include <TriggerDrive.h>
Public Member Functions | |
TriggerDrive () | |
Class constructor. More... | |
void | Initialize () override |
Runs once on initalization. More... | |
void | Execute () override |
Called in a loop during Teleop. More... | |
bool | IsFinished () override |
void | End () override |
Runs once when IsFinished() returns true. More... | |
void | Interrupted () override |
Runs once if the command is forced to stop. More... | |
Private Attributes | |
int | directionMultiplier |
Can be 1 or -1. Determines the direction the the robot moves in. More... | |
double | speedMultiplier |
The speed of the robot is multiplied by this number. Used for slowmode. More... | |
double | speed |
Speed value that will be passed into DriveTrain::ArcadeDrive. More... | |
double | rotation |
Rotation value that will be passed into DriveTrain::ArcadeDrive. More... | |
double | speedOutput = 0.0 |
double | rotationOutput = 0.0 |
frc::XboxController * | pJoyDrive |
A mnemonic for the driver's controller because we are lazy. More... | |
An interface command for driving the robot with an xbox controller.
Definition at line 12 of file TriggerDrive.h.
TriggerDrive::TriggerDrive | ( | ) |
Class constructor.
Definition at line 4 of file TriggerDrive.cpp.
|
override |
Runs once when IsFinished() returns true.
Definition at line 84 of file TriggerDrive.cpp.
|
override |
Called in a loop during Teleop.
Definition at line 25 of file TriggerDrive.cpp.
|
override |
Runs once on initalization.
Definition at line 12 of file TriggerDrive.cpp.
|
override |
Runs once if the command is forced to stop.
Definition at line 88 of file TriggerDrive.cpp.
|
override |
Used to tell wpilib if the command is fully finished. This should never return true Because we always want to be able to drive the bot during teleop
Definition at line 78 of file TriggerDrive.cpp.
|
private |
Can be 1 or -1. Determines the direction the the robot moves in.
Definition at line 30 of file TriggerDrive.h.
|
private |
A mnemonic for the driver's controller because we are lazy.
Definition at line 38 of file TriggerDrive.h.
|
private |
Rotation value that will be passed into DriveTrain::ArcadeDrive.
Definition at line 34 of file TriggerDrive.h.
|
private |
Definition at line 36 of file TriggerDrive.h.
|
private |
Speed value that will be passed into DriveTrain::ArcadeDrive.
Definition at line 33 of file TriggerDrive.h.
|
private |
The speed of the robot is multiplied by this number. Used for slowmode.
Definition at line 31 of file TriggerDrive.h.
|
private |
Definition at line 35 of file TriggerDrive.h.