Permalink
Browse files

If you hold RB, it defies the max angle

This is a description.
1 parent 870b42d commit 52c4894f9cd6021586963c9f21bce97d1b0d358d @CombustibleLemons5113 CombustibleLemons5113 committed Apr 14, 2016
@@ -22,7 +22,7 @@
private JoystickButton rumble;
private JoystickButton hookLift;
- private JoystickButton hookDrop;
+ private JoystickButton disableMaxAngle;
private JoystickButton tiltArm;
//private JoystickButton tiltDownArm;
private JoystickButton tiltJoint;
@@ -93,7 +93,7 @@ public void init()
activateAutoShoot = new JoystickButton(xboxController, xboxA);
rumble = new JoystickButton(xboxController, xboxRS);
hookLift = new JoystickButton(xboxController, xboxLB);
- //hookDrop = new JoystickButton (xboxController, xboxRB);
+ disableMaxAngle = new JoystickButton (xboxController, xboxRB);
emergencyStop = new JoystickButton(xboxController, xboxBACK);
emergencyStop2 = new JoystickButton(xboxController, xboxSTART);
@@ -119,8 +119,8 @@ public void init()
public void update(MotorManager dr)
{
- double leftYAxis = leftStick.getY();
- double rightYAxis = rightStick.getY();
+ double leftYAxis = leftStick.getY() / 2;
+ double rightYAxis = rightStick.getY() / 2;
if(Math.abs(leftYAxis) < 0.05)
leftYAxis = 0;
@@ -264,6 +264,11 @@ else if(testSubBig.get())
return newValue;
}
+ public boolean getDisableMaxAngle()
+ {
+ return disableMaxAngle.get();
+ }
+
public boolean getEStop()
{
return emergencyStop.get() || emergencyStop2.get();
@@ -240,7 +240,7 @@ public void manualTilt(MotorManager dr, JoystickController monitor, SensorManage
desiredAngle += (monitor.getTiltUpShoot() * 1);
}
- if(desiredAngle < 0 && !monitor.getDriverTiltUp())
+ if(desiredAngle < 0 && !monitor.getDriverTiltUp() && !monitor.getDisableMaxAngle()) //SELF NOTE RIGHT HERE
desiredAngle = 0;
if(monitor.getDriverTiltDown())
Binary file not shown.
View
Binary file not shown.

0 comments on commit 52c4894

Please sign in to comment.