Permalink
Browse files

Gitchi-Gummi Maint. Changes

amen
  • Loading branch information...
Maxcr1 committed Jul 26, 2018
1 parent d5764b0 commit 312994de93543852ff4e61904581889c643e0c74
@@ -29,27 +29,17 @@
public static final int PCMPort = 12;

// Intake Piston
public static final int clampPortForward = 5;
public static final int clampPortReverse = 4;
public static final int clampPortForward = 0;
public static final int clampPortReverse = 1;

// Drive Train Shifting
public static final int dtSpeedShiftForward = 1;
public static final int dtSpeedShiftReverse = 0;
public static final int dtSpeedShiftForward = 3;
public static final int dtSpeedShiftReverse = 2;

// PTO Ports
public static final int ptoShiftForward = 2;
public static final int ptoShiftReverse = 3;
public static final int ptoShiftForward = 4;
public static final int ptoShiftReverse = 5;

// Hanger Ports
public static final int platformReleasePiston = 9;

// Arduino Ports
public static final int prepArduinoDIOPort = 4;
public static final int arduinoComPort = 0;

// Analog Inputs
public static final int intakeUltrasonicInputPort = 0;
public static final int intakeUltrasonicOutputPort = 1;
public static final int elevatorBottomLimitID = 2;
public static final int elevatorTopLimitID = 3;
public static final int armEncoderPort = 2;
@@ -106,6 +106,10 @@ public static double rightTankStick(boolean squared) {
return stickVal;
}

public static double getTurn(){
return -primaryRight.getRawAxis(0);
}

// Primary Driver DT Shift Up
static boolean shiftUp() {
return (primaryRight.getRawButton(topShiftUp) || primaryLeft.getRawButton(topShiftUp)
@@ -84,14 +84,16 @@ public void teleopPeriodic() {
Scheduler.getInstance().run();

try {
StateManager.teleOpStateLooper();
shuffle.teleOp();
superStructure.subsystemLooper();


} catch (Exception e) {
DriverStation.reportError(e.toString(), true);
}


StateManager.teleOpStateLooper();
shuffle.teleOp();
superStructure.subsystemLooper();

}

@Override
@@ -42,7 +42,7 @@

}

public static boolean cheesyDrive = false;
public static boolean cheesyDrive = true;
public static DriveMode driveMode;
public static boolean ptoActive;

@@ -87,7 +87,7 @@
public static double startToPoint = 256;
public static double pointToScaleTurn = 50;
public static double pointToScale = 17;
public static double pointToBlockTurn = 100;
public static double pointToBlockTurn = 110;
public static double pointToBlock = 61;
public static double intakeSpeed = .7;
public static double intakeInSpeed = 1;
@@ -104,7 +104,7 @@
public static double point2ToScaleTurn = -95;
public static double point2ToScale = 62;
public static double point2ToPoint3 = -18;
public static double point3ToBlockTurn = -120;
public static double point3ToBlockTurn = -130;
public static double point3ToBlock = 48;
public static double intakeSpeed = .3;
public static double intakeInSpeed = .5;
@@ -89,7 +89,7 @@ public AutoManager() {

// Mode Choosers
preferenceChooser.addDefault(Constants.preferenceOneName, Preference.SWITCH);
preferenceChooser.addObject(Constants.preferenceTwoName, Preference.SCALE);
preferenceChooser.addDefault(Constants.preferenceTwoName, Preference.SCALE);

sidePriorityChooser.addDefault("1 In Scale", SidePriority.ONE_SCALE);
sidePriorityChooser.addObject("2 In Scale", SidePriority.TWO_SCALE);
@@ -13,9 +13,8 @@ public DriveForwardAuto() {
RobotStates.runningMode = RunningMode.AUTO;
this.autoName = "Drive Forward";

addSequential(new DriveStraight(240, 1));
addSequential(new TurnInPlace(90, 1));
addSequential(new DriveStraight(60, 1));
addSequential(new DriveStraight(240, 1));

}

// Put looping checks/code in here
@@ -99,7 +99,7 @@ public TwoBlockScaleCloseAuto(RobotSide side) {
addSequential(new DriveStraight(-AutoConstants.SideAutos.TwoBlockAutos.Close.pointToBlock, 1), 3);

//Turn to the scale
addSequential(new TurnInPlace(-AutoConstants.SideAutos.TwoBlockAutos.Close.pointToBlockTurn, 0.5, inversion), 1.25); //
addSequential(new TurnInPlace(-AutoConstants.SideAutos.TwoBlockAutos.Close.pointToBlockTurn, 0.5, inversion), 2); //

//Extend the arm, wait for it to go down, and shoot
addSequential(new IntakeExhaust(AutoConstants.SideAutos.TwoBlockAutos.Close.intakeSpeed, true), 1);
@@ -136,7 +136,7 @@ void driveHandler() {

// Drive with Acceleration Handler
if(RobotStates.cheesyDrive) {
cheesyDrive(dManager.cheesyDrive(ControlMap.leftTankStick(false), ControlMap.rightTankStick(false), ControlMap.getQuickTurn(),
cheesyDrive(dManager.cheesyDrive(ControlMap.leftTankStick(false), ControlMap.getTurn(), ControlMap.getQuickTurn(),
RobotStates.driveMode != RobotStates.DriveMode.LOW));

break;
@@ -216,6 +216,7 @@ public TalonSRX prepElevatorTalon(TalonSRX talon) {
Constants.elevatorUpData.timeoutMs);
talon.configPeakCurrentLimit(35, Constants.elevatorUpData.timeoutMs);
talon.configPeakCurrentDuration(500, Constants.elevatorUpData.timeoutMs);
talon.setInverted(true);
talon.setSensorPhase(false);
talon.configClosedloopRamp(.5, 10);
talon.configOpenloopRamp(Constants.elevatorRampRate, 10);
@@ -67,7 +67,6 @@ public void startCompressor() {
comp.start();
}

@SuppressWarnings("deprecation")
public void subsystemLooper() {

DataSelector.looper();
@@ -81,7 +81,8 @@ public void setSetpoint(double setpoint) {
* If the number is negative, figure out how many rotations negative it is,
* multiply that by the # of ticks needed for 1 rotation, and add that to the
* output. This shouldn't ever happen due to the nature of abs. encoders, but
* I've seen weird things, so here it is, just to be safe.
* I've seen weird
* things, so here it is, just to be safe.
*/
foo += 4096 * (Math.floor(setpoint / 4096));
}
@@ -14,7 +14,7 @@ public void init() {

driveTypeChooser.addDefault("No", false);
driveTypeChooser.addObject("Yes", true);
SmartDashboard.putData(driveTypeChooser);
SmartDashboard.putData("Bootleg Setup", driveTypeChooser);
connected();

}

0 comments on commit 312994d

Please sign in to comment.