-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into All/#305-SelfTestFramework
- Loading branch information
Showing
33 changed files
with
14,489 additions
and
8,706 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...a/org/frc5687/powerup/robot/commands/MoveCarriageToSetpointPIDButWaitForNInchesFirst.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.frc5687.powerup.robot.commands; | ||
|
||
import edu.wpi.first.wpilibj.command.CommandGroup; | ||
import org.frc5687.powerup.robot.commands.auto.AutoWaitForDistance; | ||
import org.frc5687.powerup.robot.commands.auto.AutoWaitForMillis; | ||
import org.frc5687.powerup.robot.subsystems.Carriage; | ||
import org.frc5687.powerup.robot.subsystems.DriveTrain; | ||
|
||
public class MoveCarriageToSetpointPIDButWaitForNInchesFirst extends CommandGroup { | ||
public MoveCarriageToSetpointPIDButWaitForNInchesFirst(DriveTrain drivetrain, Carriage carriage, int target, double inches) { | ||
addSequential(new AutoWaitForDistance(drivetrain, inches, 5000)); | ||
addSequential(new MoveCarriageToSetpointPIDButFirstZeroIt(carriage, target)); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/org/frc5687/powerup/robot/commands/auto/AbortIfCubeNotSecured.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.frc5687.powerup.robot.commands.auto; | ||
|
||
import edu.wpi.first.wpilibj.DriverStation; | ||
import edu.wpi.first.wpilibj.command.Command; | ||
import org.frc5687.powerup.robot.Robot; | ||
import org.frc5687.powerup.robot.subsystems.Intake; | ||
|
||
public class AbortIfCubeNotSecured extends Command { | ||
private Robot _robot; | ||
private Intake _intake; | ||
private boolean _isFinished; | ||
|
||
public AbortIfCubeNotSecured(Robot robot) { | ||
_robot = robot; | ||
_intake = robot.getIntake(); | ||
} | ||
|
||
@Override | ||
protected void initialize() { | ||
DriverStation.reportError("AbortIfCubeNotSecured initialized", false); | ||
_isFinished = true; | ||
if (!_intake.cubeIsSecured()) { | ||
DriverStation.reportError("AbortIfCubeNotSecured cube not secured!!.. calling robot.requestAbortAuton()", false); | ||
_robot.requestAbortAuton(); | ||
} | ||
} | ||
|
||
@Override | ||
protected boolean isFinished() { | ||
return _isFinished; | ||
} | ||
|
||
@Override | ||
protected void end() { | ||
DriverStation.reportError("AbortIfNoCubeDetected ending", false); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/org/frc5687/powerup/robot/commands/auto/AbortIfNoCubeDetected.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.frc5687.powerup.robot.commands.auto; | ||
|
||
import edu.wpi.first.wpilibj.DriverStation; | ||
import edu.wpi.first.wpilibj.command.Command; | ||
import org.frc5687.powerup.robot.Robot; | ||
import org.frc5687.powerup.robot.subsystems.Intake; | ||
|
||
public class AbortIfNoCubeDetected extends Command { | ||
private Robot _robot; | ||
private Intake _intake; | ||
private boolean _isFinished; | ||
|
||
public AbortIfNoCubeDetected(Robot robot) { | ||
_robot = robot; | ||
_intake = robot.getIntake(); | ||
} | ||
|
||
@Override | ||
protected void initialize() { | ||
DriverStation.reportError("AbortIfNoCubeDetected initialized", false); | ||
_isFinished = true; | ||
if (!_intake.cubeIsDetected()) { | ||
DriverStation.reportError("AbortIfNoCubeDetected no cube detected.. calling robot.requestAbortAuton()", false); | ||
_robot.requestAbortAuton(); | ||
} | ||
} | ||
|
||
@Override | ||
protected boolean isFinished() { | ||
return _isFinished; | ||
} | ||
|
||
@Override | ||
protected void end() { | ||
DriverStation.reportError("AbortIfNoCubeDetected ending", false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.