mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-09 00:28:05 -06:00
Created start for manual wrist movement
This is unfinished code
This commit is contained in:
@@ -77,6 +77,30 @@ public class Wrist extends Subsystem
|
||||
}
|
||||
}
|
||||
|
||||
public void manualWristMove()
|
||||
{
|
||||
double wristJoystickInput;
|
||||
boolean manualOverride;
|
||||
|
||||
wristJoystickInput = Robot.oi.getOperatorController().getLeftYAxis();
|
||||
|
||||
manualOverride = Robot.oi.getOperatorJoystick().getRawButton(XboxController.A_BUTTON);
|
||||
|
||||
if(manualOverride == true)
|
||||
{
|
||||
setWristControlMode(wristControlMode.JOYSTICK_MANUAL);
|
||||
}
|
||||
else if(manualOverride == false)
|
||||
{
|
||||
setWristControlMode(wristControlMode.PID);
|
||||
}
|
||||
|
||||
while(getWristControlMode() == wristControlMode.JOYSTICK_MANUAL)
|
||||
{
|
||||
wristRight.set(wristJoystickInput);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public double armAngle(double encoderValue)
|
||||
{
|
||||
@@ -96,7 +120,7 @@ public class Wrist extends Subsystem
|
||||
private synchronized WristControlMode getWristControlMode()
|
||||
{
|
||||
return this.wristControlMode;
|
||||
}
|
||||
}
|
||||
|
||||
public void setSpeed(double speed)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user