mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-09 08:38:06 -06:00
Cleanup OI
This commit is contained in:
@@ -149,20 +149,20 @@ public class XboxController implements IHandController
|
||||
|
||||
public boolean getDPadLeft(){
|
||||
return (stick.getRawAxis(LEFT_RIGHT_DPAD_AXIS) < LEFT_DPAD_TOLERANCE);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getDPadRight(){
|
||||
public boolean getDPadRight(){
|
||||
return (stick.getRawAxis(LEFT_RIGHT_DPAD_AXIS) > RIGHT_DPAD_TOLERANCE);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getDPadTop(){
|
||||
public boolean getDPadTop(){
|
||||
return (stick.getRawAxis(TOP_BOTTOM_DPAD_AXIS) < TOP_DPAD_TOLERANCE);
|
||||
}
|
||||
}
|
||||
|
||||
/*public boolean getDPadBottom(){
|
||||
public boolean getDPadBottom(){
|
||||
return (stick.getRawAxis(TOP_BOTTOM_DPAD_AXIS) > BOTTOM_DPAD_TOLERANCE);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public boolean getLeftTrigger(){
|
||||
return (getLeftTriggerAxis() > LEFT_TRIGGER_TOLERANCE);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,9 @@ public class OI
|
||||
//liftBallIntake.whenPressed(new HatchFlip(false));
|
||||
liftBallIntake.whenPressed(new LiftBallDropHatch());
|
||||
|
||||
JoystickButton safteySwitch = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.START_BUTTON);
|
||||
safteySwitch.whenPressed(new setClimberSafety(true));
|
||||
safteySwitch.whenReleased(new setClimberSafety(false));
|
||||
|
||||
JoystickButton climbUp = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.RIGHT_TRIGGER_AXIS);
|
||||
JoystickButton climbDown = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.LEFT_TRIGGER_AXIS);
|
||||
@@ -95,10 +98,6 @@ public class OI
|
||||
SmartDashboard.putData("run arm test", new ArmTest());
|
||||
SmartDashboard.putData("wrist test", new wristTest());
|
||||
|
||||
JoystickButton safteySwitch = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.START_BUTTON);
|
||||
safteySwitch.whenPressed(new setClimberSafety(true));
|
||||
safteySwitch.whenReleased(new setClimberSafety(false));
|
||||
|
||||
//SmartDashboard.putData("PRE GAME!!!!", new PreGame());
|
||||
} catch (Exception e) {
|
||||
System.err.println("An error occurred in the OI constructor");
|
||||
|
||||
Reference in New Issue
Block a user