projects
/
3501
/
2017steamworks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4082be
)
Remove getters for shift pistons
author
Rohan Rodrigues
<rohanrodrigues19@gmail.com>
Sat, 4 Mar 2017 19:30:38 +0000
(11:30 -0800)
committer
Rohan Rodrigues
<rohanrodrigues19@gmail.com>
Sat, 4 Mar 2017 19:30:38 +0000
(11:30 -0800)
src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java
b/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java
index 3a17440b1e920cd182db1cbc87d20c003296346e..ca802e705291cff2ebd02ae5658a25f9998dd840 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java
@@
-31,16
+31,11
@@
public class ToggleGear extends Command {
Value rightGearPistonValue = driveTrain.getRightGearPistonValue();
if (leftGearPistonValue == Constants.DriveTrain.LOW_GEAR) {
Value rightGearPistonValue = driveTrain.getRightGearPistonValue();
if (leftGearPistonValue == Constants.DriveTrain.LOW_GEAR) {
- driveTrain.setHighGear(
driveTrain.getLeftPiston()
);
+ driveTrain.setHighGear();
} else {
} else {
- driveTrain.setLowGear(
driveTrain.getLeftPiston()
);
+ driveTrain.setLowGear();
}
}
- if (rightGearPistonValue == Constants.DriveTrain.LOW_GEAR) {
- driveTrain.setHighGear(driveTrain.getRightPiston());
- } else {
- driveTrain.setLowGear(driveTrain.getRightPiston());
- }
}
@Override
}
@Override
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
index 932e8453571534091963f90b9b84a2dabfcd1a33..ab46b3fa39f1ca974889abb6f74a87ba89218f43 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
@@
-3,6
+3,7
@@
package org.usfirst.frc.team3501.robot.commands.shooter;
import org.usfirst.frc.team3501.robot.Robot;
import org.usfirst.frc.team3501.robot.subsystems.Shooter;
import org.usfirst.frc.team3501.robot.Robot;
import org.usfirst.frc.team3501.robot.subsystems.Shooter;
+import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
@@
-19,7
+20,7
@@
import edu.wpi.first.wpilibj.command.Command;
*/
public class RunIndexWheelContinuous extends Command {
private Shooter shooter = Robot.getShooter();
*/
public class RunIndexWheelContinuous extends Command {
private Shooter shooter = Robot.getShooter();
-
//
private Timer t = new Timer();
+ private Timer t = new Timer();
/**
* See JavaDoc comment in class for details
/**
* See JavaDoc comment in class for details
@@
-35,7
+36,7
@@
public class RunIndexWheelContinuous extends Command {
// Called just before this Command runs the first time
@Override
protected void initialize() {
// Called just before this Command runs the first time
@Override
protected void initialize() {
-
//
t.reset();
+ t.reset();
}
// Called repeatedly when this Command is scheduled to run
}
// Called repeatedly when this Command is scheduled to run
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
index 328209e5d82a9f87149130d4657c1938f3508d6a..32ec7b221ab237ef17747dfa46f47f8246ace31b 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
@@
-165,33
+165,26
@@
public class DriveTrain extends Subsystem {
return rightGearPiston.get();
}
return rightGearPiston.get();
}
- public DoubleSolenoid getLeftPiston() {
- return this.leftGearPiston;
- }
-
- public DoubleSolenoid getRightPiston() {
- return this.rightGearPiston;
- }
-
/*
* Changes the ball shift gear assembly to high
*/
/*
* Changes the ball shift gear assembly to high
*/
- public void setHighGear(
DoubleSolenoid p
) {
- changeGear(Constants.DriveTrain.HIGH_GEAR
, p
);
+ public void setHighGear() {
+ changeGear(Constants.DriveTrain.HIGH_GEAR);
}
/*
* Changes the ball shift gear assembly to low
*/
}
/*
* Changes the ball shift gear assembly to low
*/
- public void setLowGear(
DoubleSolenoid p
) {
- changeGear(Constants.DriveTrain.LOW_GEAR
, p
);
+ public void setLowGear() {
+ changeGear(Constants.DriveTrain.LOW_GEAR);
}
/*
* Changes the gear to a DoubleSolenoid.Value
*/
}
/*
* Changes the gear to a DoubleSolenoid.Value
*/
- private void changeGear(DoubleSolenoid.Value gear, DoubleSolenoid piston) {
- piston.set(gear);
+ private void changeGear(DoubleSolenoid.Value gear) {
+ leftGearPiston.set(gear);
+ rightGearPiston.set(gear);
}
@Override
}
@Override