Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Commit

Permalink
Replace the XBox triggers with claw open / close
Browse files Browse the repository at this point in the history
  • Loading branch information
HeroCC committed Sep 14, 2018
1 parent 38e061c commit 4d914e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
import com.ctre.phoenix.motorcontrol.ControlMode;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import lombok.Getter;
import org.iraiders.robot2018.robot.OI;
import org.iraiders.robot2018.robot.Robot;
import org.iraiders.robot2018.robot.RobotMap;
import org.iraiders.robot2018.robot.commands.OIDrive;
import org.iraiders.robot2018.robot.commands.auto.PathfindingAuto;
import org.iraiders.robot2018.robot.commands.auto.VisionAuto;
import org.iraiders.robot2018.robot.commands.feedback.EncoderReporter;
import org.iraiders.robot2018.robot.commands.feedback.RumbleListener;

Expand All @@ -38,11 +35,11 @@ public DriveSubsystem() {
// For debugging pathfinding in auto
if (a == null) a = new PathfindingAuto(this, Robot.getArmSubsystem(), Robot.getGrabberSubsystem());
a.cancel();
JoystickButton testPathfinding = new JoystickButton(OI.getXBoxController(), 5); // LB
testPathfinding.whenPressed(a);
//JoystickButton testPathfinding = new JoystickButton(OI.getXBoxController(), 5); // LB
//testPathfinding.whenPressed(a);

JoystickButton testSebbys = new JoystickButton(OI.getXBoxController(), 6); // RB
testSebbys.whenPressed(new VisionAuto(this, Robot.getArmSubsystem()));
//JoystickButton testSebbys = new JoystickButton(OI.getXBoxController(), 6); // RB
//testSebbys.whenPressed(new VisionAuto(this, Robot.getArmSubsystem()));
}

new EncoderReporter(frontLeftTalon, frontRightTalon).start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ public class GrabberSubsystem extends Subsystem {
public GrabberSubsystem() {
open.whenPressed(new ControlGrabber(this, GrabberPosition.OPEN));
close.whenPressed(new ControlGrabber(this, GrabberPosition.CLOSE));

JoystickButton xboxClose = new JoystickButton(OI.getXBoxController(), 5); // LB
xboxClose.whenPressed(new ControlGrabber(this, GrabberPosition.CLOSE));

JoystickButton xboxOpen = new JoystickButton(OI.getXBoxController(), 6); // RB
xboxOpen.whenPressed(new ControlGrabber(this, GrabberPosition.OPEN));

grabberSolenoid.setName(this.getName(), "Grabber Solenoid");
}
Expand Down

0 comments on commit 4d914e1

Please sign in to comment.