mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-09 00:28:05 -06:00
Merge branch 'develop' of https://github.com/Team4388/2019-Hit-or-Miss into develop
This commit is contained in:
@@ -13,4 +13,6 @@ public interface IHandController {
|
||||
public double getLeftTriggerAxis();
|
||||
|
||||
public double getRightTriggerAxis();
|
||||
|
||||
public int getDpadAngle();
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -273,7 +273,6 @@ public class Arm extends Subsystem implements ControlLoopable
|
||||
// Do the update
|
||||
if (armControlMode == ArmControlMode.JOYSTICK_MANUAL) {
|
||||
controlManualWithJoystick();
|
||||
|
||||
}
|
||||
else if (!isFinished) {
|
||||
if (armControlMode == ArmControlMode.MOTION_PROFILE) {
|
||||
@@ -282,9 +281,11 @@ public class Arm extends Subsystem implements ControlLoopable
|
||||
}
|
||||
if (armControlMode == ArmControlMode.JOYSTICK_PID){
|
||||
//System.err.println(motor1.getControlMode());
|
||||
controlPidWithJoystick();
|
||||
|
||||
|
||||
if (Robot.oi.getOperatorController().getDpadAngle() == -1){
|
||||
controlPidWithJoystick();
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*else if (armControlMode == ArmControlMode.MP_PATH_VELOCITY) {
|
||||
|
||||
Reference in New Issue
Block a user