From 2f8480b56ef5f11644087d89340996fe125ebe78 Mon Sep 17 00:00:00 2001 From: lukesta182 <33330639+lukesta182@users.noreply.github.com> Date: Sun, 17 Feb 2019 16:21:58 -0700 Subject: [PATCH] added in robot init stuff --- 2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java | 2 +- .../src/main/java/org/usfirst/frc4388/robot/Robot.java | 2 ++ .../java/org/usfirst/frc4388/robot/subsystems/Wrist.java | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java index 4605dfd..14203a2 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java @@ -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); diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/Robot.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/Robot.java index c2c6a02..a693693 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/Robot.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/Robot.java @@ -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(); diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Wrist.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Wrist.java index bfb7817..250193f 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Wrist.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Wrist.java @@ -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) {