mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-09 08:38:06 -06:00
added in robot init stuff
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user