DeepSpace
2019
|
A subsystem that interfaces with the drivebase on the robot. More...
#include <DriveTrain.h>
Public Member Functions | |
DriveTrain () | |
Class constructor. More... | |
void | InitDefaultCommand () override |
Initalizes the default command for this subsystem (DriveWithJoystick) More... | |
void | ArcadeDrive (double xSpeed, double zRotation) |
void | TankDrive (double leftSpeed, double rightSpeed) |
void | RadialDrive (double magnitude, double radial) |
void | RawDrive (double l, double r) |
void | Coast () |
void | Break () |
Private Attributes | |
can::WPI_TalonSRX * | pLeftFrontMotor |
Pointer for left front motor. More... | |
can::WPI_TalonSRX * | pLeftRearMotor |
Pointer for left rear motor. More... | |
can::WPI_TalonSRX * | pRightFrontMotor |
Pointer for right front motor. More... | |
can::WPI_TalonSRX * | pRightRearMotor |
Pointer for right rear motor. More... | |
rr::PIDController * | pArcadeController |
frc::DifferentialDrive * | pRobotDrive |
Pointer for a differential drivebase made up of 2 motor pairs. More... | |
A subsystem that interfaces with the drivebase on the robot.
Definition at line 13 of file DriveTrain.h.
DriveTrain::DriveTrain | ( | ) |
Class constructor.
Definition at line 3 of file DriveTrain.cpp.
void DriveTrain::ArcadeDrive | ( | double | xSpeed, |
double | zRotation | ||
) |
Pass data to wpilib's ArcadeDrive
xSpeed | Forward speed (form -1 to 1) |
zRotation | Rotation (from -1 to 1) |
Definition at line 53 of file DriveTrain.cpp.
void DriveTrain::Break | ( | ) |
Definition at line 96 of file DriveTrain.cpp.
void DriveTrain::Coast | ( | ) |
Definition at line 88 of file DriveTrain.cpp.
|
override |
Initalizes the default command for this subsystem (DriveWithJoystick)
Definition at line 49 of file DriveTrain.cpp.
void DriveTrain::RadialDrive | ( | double | magnitude, |
double | radial | ||
) |
Drive with circles
magnitude | Magnitude modifier for the radius output |
radial | Value that is computed into the outside motor's basic output |
Definition at line 64 of file DriveTrain.cpp.
void DriveTrain::RawDrive | ( | double | l, |
double | r | ||
) |
Definition at line 83 of file DriveTrain.cpp.
void DriveTrain::TankDrive | ( | double | leftSpeed, |
double | rightSpeed | ||
) |
Passes data to wpilib's TankDrive
leftSpeed | left motor speed |
rightSpeed | right motor speed |
Definition at line 59 of file DriveTrain.cpp.
|
private |
Definition at line 52 of file DriveTrain.h.
|
private |
Pointer for left front motor.
Definition at line 47 of file DriveTrain.h.
|
private |
Pointer for left rear motor.
Definition at line 48 of file DriveTrain.h.
|
private |
Pointer for right front motor.
Definition at line 49 of file DriveTrain.h.
|
private |
Pointer for right rear motor.
Definition at line 50 of file DriveTrain.h.
|
private |
Pointer for a differential drivebase made up of 2 motor pairs.
Definition at line 54 of file DriveTrain.h.