DeepSpace  2019
TriggerDrive.h
Go to the documentation of this file.
1 #ifndef _TRIGGERDRIVE_HG_
3 #define _TRIGGERDRIVE_HG_
4 
5 #include <frc/commands/Command.h>
7 #include "RobotMap.h"
8 #include <frc/GenericHID.h>
10 
11 
12 class TriggerDrive : public frc::Command {
13  public:
14  TriggerDrive();
15  void Initialize() override;
16  void Execute() override;
17 
24  bool IsFinished() override;
25 
26  void End() override;
27  void Interrupted() override;
28 
29 private:
31  double speedMultiplier;
32 
33  double speed;
34  double rotation;
35  double speedOutput = 0.0;
36  double rotationOutput = 0.0;
37 
38  frc::XboxController* pJoyDrive;
39 };
40 
41 #endif // _TRIGGERDRIVE_HG_
int directionMultiplier
Can be 1 or -1. Determines the direction the the robot moves in.
Definition: TriggerDrive.h:30
void End() override
Runs once when IsFinished() returns true.
void Interrupted() override
Runs once if the command is forced to stop.
TriggerDrive()
Class constructor.
Definition: TriggerDrive.cpp:4
void Execute() override
Called in a loop during Teleop.
An interface command for driving the robot with an xbox controller.
Definition: TriggerDrive.h:12
double speed
Speed value that will be passed into DriveTrain::ArcadeDrive.
Definition: TriggerDrive.h:33
void Initialize() override
Runs once on initalization.
double rotation
Rotation value that will be passed into DriveTrain::ArcadeDrive.
Definition: TriggerDrive.h:34
double speedOutput
Definition: TriggerDrive.h:35
bool IsFinished() override
frc::XboxController * pJoyDrive
A mnemonic for the driver&#39;s controller because we are lazy.
Definition: TriggerDrive.h:38
double rotationOutput
Definition: TriggerDrive.h:36
double speedMultiplier
The speed of the robot is multiplied by this number. Used for slowmode.
Definition: TriggerDrive.h:31