mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-08 16:18:02 -06:00
added in ball intake motor and pnumatics
This commit is contained in:
@@ -41,14 +41,14 @@ public class OI
|
||||
m_driverXbox = new XboxController(RobotMap.DRIVER_JOYSTICK_1_USB_ID);
|
||||
m_operatorXbox = new XboxController(RobotMap.OPERATOR_JOYSTICK_1_USB_ID);
|
||||
|
||||
/* XBoxTriggerButton CarriageIntake = new XBoxTriggerButton(m_operatorXbox, XBoxTriggerButton.LEFT_TRIGGER);
|
||||
CarriageIntake.whenPressed(new IntakeSetSpeed(Carriage.CUBE_EJECT_SPEED));
|
||||
CarriageIntake.whenReleased(new IntakeSetSpeed(0.0));
|
||||
XBoxTriggerButton CarriageIntake = new XBoxTriggerButton(m_operatorXbox, XBoxTriggerButton.LEFT_TRIGGER);
|
||||
CarriageIntake.whenPressed(new SetIntakeSpeed(BallIntake.BALL_INTAKE_SPEED));
|
||||
CarriageIntake.whenReleased(new SetIntakeSpeed(0.0));
|
||||
|
||||
XBoxTriggerButton CarriageEject = new XBoxTriggerButton(m_operatorXbox, XBoxTriggerButton.RIGHT_TRIGGER);
|
||||
CarriageEject.whenPressed(new IntakeSetSpeed(Carriage.CUBE_INTAKE_SPEED));
|
||||
CarriageEject.whenReleased(new IntakeSetSpeed(0.0));
|
||||
*/
|
||||
CarriageEject.whenPressed(new SetIntakeSpeed(BallIntake.BALL_EXTAKE_SPEED));
|
||||
CarriageEject.whenReleased(new SetIntakeSpeed(0.0));
|
||||
|
||||
//JoystickButton endEfector = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.X_BUTTON);
|
||||
//endEfector.toggleWhenActive(new WristPlacement(true));
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@ public class RobotMap {
|
||||
public static final int DRIVETRAIN_RIGHT_MOTOR1_CAN_ID = 4;
|
||||
public static final int DRIVETRAIN_RIGHT_MOTOR2_CAN_ID = 5;
|
||||
|
||||
//carriage motors
|
||||
public static final int CARRIAGE_LEFT_MOTOR_CAN_ID = 8;
|
||||
public static final int CARRIAGE_RIGHT_MOTOR_CAN_ID = 9;
|
||||
//Intake motors
|
||||
public static final int INTAKE_BELT_DRIVE_CAN_ID = 8;
|
||||
|
||||
//Elevator Motors
|
||||
public static final int ELEVATOR_MOTOR1_ID = 6;
|
||||
|
||||
@@ -21,8 +21,8 @@ public class BallIntake extends Subsystem {
|
||||
|
||||
private WPI_TalonSRX BallIntakeMain;
|
||||
public static enum BallIntakeControlMode { JOYSTICK, MP_STRAIGHT, HOLD, MANUAL};
|
||||
public static final double BALL_INTAKE_SPEED = 0.40;
|
||||
public static final double BALL_EXTAKE_SPEED = -1.0;
|
||||
public static final double BALL_INTAKE_SPEED = -1.0;
|
||||
public static final double BALL_EXTAKE_SPEED = 1.0;
|
||||
public static final double CUBE_STOP_SPEED = 0;
|
||||
/////^^^^^^^^^ replace this line with the modes we need
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BallIntake extends Subsystem {
|
||||
|
||||
public BallIntake() {
|
||||
try {
|
||||
BallIntakeMain = new WPI_TalonSRX(RobotMap.CLIMBER_CAN_ID);
|
||||
BallIntakeMain = new WPI_TalonSRX(RobotMap.INTAKE_BELT_DRIVE_CAN_ID);
|
||||
//\][carriageLeft.set(CurrentLimit, value);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user