import frc.robot.commands.gpm.BrownOutControl;
import frc.robot.commands.gpm.ClimbDriveCommand;
import frc.robot.commands.gpm.IntakeMovementCommand;
+import frc.robot.commands.gpm.LockedShoot;
import frc.robot.commands.gpm.RunSpindexer;
import frc.robot.commands.gpm.Superstructure;
import frc.robot.commands.vision.ShutdownAllPis;
// put the Chooser on the SmartDashboard
SmartDashboard.putData("Auto chooser", autoChooser);
+ SmartDashboard.putData("Lock Shooting", new LockedShoot(turret, drive, hood, shooter));
+
if (turret != null) {
turret.setDefaultCommand(new Superstructure(turret, drive, hood, shooter, spindexer));
}
Logger.recordOutput("TrenchAlign", swerve.getTrenchAlign());
Logger.recordOutput("AlignZones", TrenchAssistConstants.ALIGN_ZONES);
}
- if (swerve.getTrenchAlign()) {
- boolean inZone = false;
- for (Rectangle2d rectangle : TrenchAssistConstants.ALIGN_ZONES) {
- if (rectangle.contains(swerve.getPose().getTranslation())) {
- inZone = true;
- }
- }
-
- if (inZone) {
-
- double yawDegrees = swerve.getYaw().getDegrees();
- // double snappedDeg = Math.round(yawDegrees / 90.0) * 90.0;
- if (Math.abs(yawDegrees) <= 90) {
- swerve.setAlignAngle(Units.degreesToRadians(0.0));
- } else {
- swerve.setAlignAngle(Units.degreesToRadians(180.0));
- }
- // swerve.setAlignAngle(snappedDeg);
- // Logger.recordOutput("snappy", snappedDeg);
- } else {
- swerve.setIsAlign(false);
- }
- } else {
- swerve.setIsAlign(false);
- }
- if (!Constants.DISABLE_LOGGING) {
- Logger.recordOutput("TrenchAssist", swerve.getTrenchAssist());
- }
+ // if (swerve.getTrenchAlign()) {
+ // boolean inZone = false;
+ // for (Rectangle2d rectangle : TrenchAssistConstants.ALIGN_ZONES) {
+ // if (rectangle.contains(swerve.getPose().getTranslation())) {
+ // inZone = true;
+ // }
+ // }
+
+ // if (inZone) {
+
+ // double yawDegrees = swerve.getYaw().getDegrees();
+ // // double snappedDeg = Math.round(yawDegrees / 90.0) * 90.0;
+ // if (Math.abs(yawDegrees) <= 90) {
+ // swerve.setAlignAngle(Units.degreesToRadians(0.0));
+ // } else {
+ // swerve.setAlignAngle(Units.degreesToRadians(180.0));
+ // }
+ // // swerve.setAlignAngle(snappedDeg);
+ // // Logger.recordOutput("snappy", snappedDeg);
+ // } else {
+ // swerve.setIsAlign(false);
+ // }
+ // } else {
+ // swerve.setIsAlign(false);
+ // }
+ // if (!Constants.DISABLE_LOGGING) {
+ // Logger.recordOutput("TrenchAssist", swerve.getTrenchAssist());
+ // }
if (swerve.getTrenchAssist()) {
drive(TrenchAssist.calculate(swerve, corrected, trenchAssistPid));
*/
public void driveHeading(double xSpeed, double ySpeed, double heading, boolean fieldRelative) {
double rot = rotationController.calculate(getYaw().getRadians(), heading);
- ChassisSpeeds speeds = new ChassisSpeeds(xSpeed, ySpeed, -rot);
+ ChassisSpeeds speeds = new ChassisSpeeds(xSpeed, ySpeed, rot);
if (fieldRelative) {
speeds = ChassisSpeeds.fromFieldRelativeSpeeds(speeds, getYaw());
}