added in robot init stuff

This commit is contained in:
lukesta182
2019-02-17 16:21:58 -07:00
parent 5bf04716bb
commit 2f8480b56e
3 changed files with 6 additions and 4 deletions
@@ -53,7 +53,7 @@ public class OI
Expand.whenPressed(new WristPlacement(true));
JoystickButton Contract = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.A_BUTTON);
Contract.whenPressed(new WristPlacement(true));
Contract.whenPressed(new WristPlacement(false));
//JoystickButton endEfector = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.X_BUTTON);
@@ -30,6 +30,7 @@ public class Robot extends IterativeRobot
public static final Drive drive = new Drive();
public static final Arm arm = new Arm();
public static final Wrist wrist = new Wrist();
@@ -59,6 +60,7 @@ public class Robot extends IterativeRobot
controlLoop.addLoopable(drive);
controlLoop.addLoopable(arm);
controlLoop.addLoopable(wrist);
operationModeChooser = new SendableChooser<OperationMode>();
@@ -102,7 +102,7 @@ public class Wrist extends Subsystem implements ControlLoopable
public Wrist() {
try {
wristmotor1 = TalonSRXFactory.createTalonEncoder(RobotMap.WRIST_MOTOR_ID, (ENCODER_TICKS_TO_INCHES), false, FeedbackDevice.QuadEncoder);
System.err.println("the tallon shold be made in wrist");
wristmotor1.setInverted(true);
@@ -139,7 +139,7 @@ public class Wrist extends Subsystem implements ControlLoopable
}
public void setSpeed(double speed) {
wristmotor1.set(ControlMode.PercentOutput, speed*0.3);
wristmotor1.set(ControlMode.PercentOutput, speed);
setWristControlMode(WristControlMode.MANUAL);
}
@@ -287,7 +287,7 @@ public class Wrist extends Subsystem implements ControlLoopable
private void controlManualWithJoystick() {
double joyStickSpeed = -Robot.oi.getOperatorController().getRightYAxis();
setSpeedJoystick(joyStickSpeed*.10);
setSpeedJoystick(joyStickSpeed*.50);
}
/*
public void setShiftState(ElevatorSpeedShiftState state) {