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

Commit 0a66931

Browse files
just moving some commands/button around to try and make room on the
manipulator
1 parent 0df70bc commit 0a66931

3 files changed

Lines changed: 18 additions & 17 deletions

File tree

Robot2018/src/org/usfirst/frc/team199/Robot2018/OI.java

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import org.usfirst.frc.team199.Robot2018.commands.ShiftHighGear;
2424
import org.usfirst.frc.team199.Robot2018.commands.ShiftLowGear;
2525
import org.usfirst.frc.team199.Robot2018.commands.StopIntake;
26-
import org.usfirst.frc.team199.Robot2018.commands.ToggleLeftIntake;
27-
import org.usfirst.frc.team199.Robot2018.commands.ToggleRightIntake;
2826
import org.usfirst.frc.team199.Robot2018.commands.UpdatePIDConstants;
2927
import org.usfirst.frc.team199.Robot2018.subsystems.LiftInterface.LiftHeight;
3028

@@ -125,9 +123,6 @@ public OI(Robot robot) {
125123
moveLiftDownButton = new JoystickButton(rightJoy, getButton("Run Lift Motor Down", 11));
126124
moveLiftDownButton.whileHeld(new MoveLift(Robot.lift, false));
127125

128-
stopIntakeButton = new JoystickButton(rightJoy, getButton("Stop Intake Button", 6));
129-
stopIntakeButton.whenPressed(new StopIntake());
130-
131126
manipulator = new Joystick(2);
132127
if (manipulator.getButtonCount() == 0) {
133128
System.err.println(
@@ -137,20 +132,21 @@ public OI(Robot robot) {
137132
closeIntakeButton.whenPressed(new CloseIntake());
138133
openIntakeButton = new JoystickButton(manipulator, getButton("Open Intake Button", 2));
139134
openIntakeButton.whenPressed(new OpenIntake());
140-
// raiseIntake = new JoystickButton(manipulator, getButton("Raise Intake
141-
// Button", 3));
142-
// raiseIntake.whenPressed(new RaiseIntake());
143-
// lowerIntake = new JoystickButton(manipulator, getButton("Lower Intake
144-
// Button", 4));
145-
// lowerIntake.whenPressed(new LowerIntake());
135+
146136
intakeCubeButton = new JoystickButton(manipulator, getButton("Intake Button", 5));
147137
intakeCubeButton.whenPressed(new IntakeCube());
148138
outakeCubeButton = new JoystickButton(manipulator, getButton("Outake Button", 6));
149139
outakeCubeButton.whenPressed(new OuttakeCube());
150-
toggleLeftIntakeButton = new JoystickButton(manipulator, getButton("Toggle Left Intake Button", 3));
151-
toggleLeftIntakeButton.whenPressed(new ToggleLeftIntake());
152-
toggleRightIntakeButton = new JoystickButton(manipulator, getButton("Toggle Right Intake Button", 4));
153-
toggleRightIntakeButton.whenPressed(new ToggleRightIntake());
140+
141+
stopIntakeButton = new JoystickButton(manipulator, getButton("Stop Intake Button", 3));
142+
stopIntakeButton.whenPressed(new StopIntake());
143+
144+
// toggleLeftIntakeButton = new JoystickButton(manipulator, getButton("Toggle
145+
// Left Intake Button", 3));
146+
// toggleLeftIntakeButton.whenPressed(new ToggleLeftIntake());
147+
// toggleRightIntakeButton = new JoystickButton(manipulator, getButton("Toggle
148+
// Right Intake Button", 4));
149+
// toggleRightIntakeButton.whenPressed(new ToggleRightIntake());
154150
}
155151

156152
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public DefaultIntake() {
1818
}
1919

2020
// Called just before this Command runs the first time
21+
@Override
2122
protected void initialize() {
2223
try {
2324
Robot.oi.manipulator.getRawAxis(1);
@@ -28,6 +29,7 @@ protected void initialize() {
2829
}
2930

3031
// Called repeatedly when this Command is scheduled to run
32+
@Override
3133
protected void execute() {
3234
// 1 and 5 represent the axes' index in driver station
3335
if (manipulatorPluggedIn) {
@@ -37,17 +39,20 @@ protected void execute() {
3739
}
3840

3941
// Make this return true when this Command no longer needs to run execute()
42+
@Override
4043
protected boolean isFinished() {
4144
return false;
4245
}
4346

4447
// Called once after isFinished returns true
48+
@Override
4549
protected void end() {
4650
Robot.intakeEject.runIntake(0);
4751
}
4852

4953
// Called when another command which requires one or more of the same
5054
// subsystems is scheduled to run
55+
@Override
5156
protected void interrupted() {
5257
end();
5358
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.usfirst.frc.team199.Robot2018.Robot;
44
import org.usfirst.frc.team199.Robot2018.RobotMap;
5-
import org.usfirst.frc.team199.Robot2018.commands.DefaultIntake;
65

76
import edu.wpi.first.wpilibj.DoubleSolenoid;
87
import edu.wpi.first.wpilibj.PowerDistributionPanel;
@@ -39,7 +38,8 @@ public boolean isOpen(DoubleSolenoid.Value val) {
3938
*/
4039
@Override
4140
public void initDefaultCommand() {
42-
setDefaultCommand(new DefaultIntake());
41+
// I don't want this on the manipulator joysticks during a match
42+
// setDefaultCommand(new DefaultIntake());
4343
}
4444

4545
/**

0 commit comments

Comments
 (0)