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