Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
silverx257 committed Oct 26, 2024
1 parent 20f324e commit b4a7c76
Showing 1 changed file with 0 additions and 74 deletions.
74 changes: 0 additions & 74 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,81 +201,7 @@ else if (driverController.getRightX() > 0) {
return 0.0;
});


// if (
// // (driverController.getTouchpad() && superSystem.getIsPassing())
// // ||
// driverController.getTriangleButton())
// {
// if (!IsRedSide()) {
// return 315.0;
// } else {
// return 45.0;
// }
// }
// if (driverController.getL2Button()) {
// return swerveDrive.getTurnToSpecificTagAngle(IsRedSide() ? 4 : 7); // TODO, update?
// // 4 if red side, 7 if blue
// }
// if (driverController.getCircleButton()) { //turn to amp
// if (!IsRedSide()){
// return 270.0;
// }
// return 90.0;
// }
// else
// if (driverController.getL1Button()) { //turn to speaker
// return 0.0;
// }
// else if (driverController.getR1Button()) {
// return 180.0;
// }
// if (driverController.getPSButton()) { // Turn to shuffleboard angle
// return SmartDashboard.getNumber("Test Desired Angle", 0);
// }

swerveDrive.setDefaultCommand(swerveJoystickCommand);

// Point to angle
// swerveDrive.setDefaultCommand(
// new SwerveJoystickCommand(
// swerveDrive,
// () -> -commandDriverController.getLeftY(), // Horizontal translation
// commandDriverController::getLeftX, // Vertical Translation

// () -> {
// if (driverController.getCircleButton()) {
// noteCamera.calculateRotationSpeed(0, 0); // Values from SwerveDrive2024/isMeToKitBot
// return (noteCamera.getRotationSpeed() * 180 / Math.PI) / 20; // Convert radians to degrees and divide by 20 for how often it's run
// }
// if(driverController.getR1Button() && driverController.getL2Button()){
// return 0.0;
// }
// if(driverController.getR1Button()){
// return -4.5;
// }
// if(driverController.getL2Button()){
// return 4.5;
// }
// return 0.0;
// },
// () -> false, // Field oriented
// driverController::getCrossButton, // Towing
// () -> driverController.getR2Button(), // Precision mode (disabled)
// () -> true, // Turn to angle
// () -> { // Turn To angle Direction
// double xValue = commandDriverController.getRightX();
// double yValue = commandDriverController.getRightY();
// double magnitude = (xValue*xValue) + (yValue*yValue);
// if (magnitude > 0.49) {
// double angle = (90 + NerdyMath.radiansToDegrees(Math.atan2(commandDriverController.getRightY(), commandDriverController.getRightX())));
// angle = (((-1 * angle) % 360) + 360) % 360;
// SmartDashboard.putNumber("desired angle", angle);
// return angle;
// }
// return 1000.0;
// }
// ));
}

public void initDefaultCommands_test() {}
Expand Down

0 comments on commit b4a7c76

Please sign in to comment.