Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit 3e21592

Browse files
committed
added javadoc and clearer names for shifting drivetrain gear
1 parent f09460b commit 3e21592

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

Robot2018/src/org/usfirst/frc/team199/Robot2018/commands/ShiftHighGear.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected void initialize() {
2727

2828
// Called repeatedly when this Command is scheduled to run
2929
protected void execute() {
30-
Robot.dt.pushGear(true);
30+
Robot.dt.changeShiftGear(true);
3131
SmartDashboard.putBoolean("High Gear", true);
3232
}
3333

Robot2018/src/org/usfirst/frc/team199/Robot2018/commands/ShiftLowGear.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected void initialize() {
2727

2828
// Called repeatedly when this Command is scheduled to run
2929
protected void execute() {
30-
Robot.dt.pushGear(false);
30+
Robot.dt.changeShiftGear(false);
3131
SmartDashboard.putBoolean("High Gear", false);
3232
}
3333

Robot2018/src/org/usfirst/frc/team199/Robot2018/subsystems/Drivetrain.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ public class Drivetrain extends Subsystem implements PIDOutput, PIDSource {
4949
private final AnalogGyro dtGyro = RobotMap.dtGyro;
5050
private final DoubleSolenoid dtGear = RobotMap.dtGear;
5151

52-
public void pushGear(boolean forw) {
52+
/**
53+
* Activates the solenoid to push the drivetrain into low or high gear
54+
*
55+
* @param forw
56+
* if the solenoid is to be pushed forward or not
57+
*/
58+
public void changeShiftGear(boolean forw) {
5359
if (forw ^ Robot.getBool("Drivetrain Gear Shift Backwards", false)) {
5460
dtGear.set(DoubleSolenoid.Value.kForward);
5561
} else {

0 commit comments

Comments
 (0)