Skip to content

Commit

Permalink
RAD
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonS09 committed Mar 4, 2024
1 parent 9b1d4fb commit 5ea8b8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions src/main/java/org/carlmontrobotics/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ public static final class Arm {
//TODO: finish understand why this is broken public static final Measure<Angle> INTAKE_ANGLE = Degrees.to(-1);

// USE RADIANS FOR THE ARM
public static final double INTAKE_ANGLE = Units.degreesToRadians(0);
public static final double AMP_ANGLE = Units.degreesToRadians(105);
public static final double SUBWOFFER_ANGLE = Units.degreesToRadians(24);
public static final double SAFE_ZONE_ANGLE = Units.degreesToRadians(24);
public static final double PODIUM_ANGLE = Units.degreesToRadians(24);
public static final double CLIMBER_UP_ANGLE = Units.degreesToRadians(24);
public static final double CLIMBER_DOWN_ANGLE = Units.degreesToRadians(24);
public static final double INTAKE_ANGLE_RAD = Units.degreesToRadians(0);
public static final double AMP_ANGLE_RAD = Units.degreesToRadians(105);
public static final double SUBWOFFER_ANGLE_RAD = Units.degreesToRadians(24);
public static final double SAFE_ZONE_ANGLE_RAD = Units.degreesToRadians(24);
public static final double PODIUM_ANGLE_RAD = Units.degreesToRadians(24);
public static final double CLIMBER_UP_ANGLE_RAD = Units.degreesToRadians(24);
public static final double CLIMBER_DOWN_ANGLE_RAD = Units.degreesToRadians(24);


//PID, Feedforward, Trapezoid
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/carlmontrobotics/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ private void setBindingsManipulator() {
//right joystick used for manual arm control

// Speaker Buttons
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_SPEAKER_POD_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(PODIUM_ANGLE);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_SPEAKER_NEXT_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(SUBWOFFER_ANGLE);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_SPEAKER_SAFE_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(SAFE_ZONE_ANGLE);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_SPEAKER_POD_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(PODIUM_ANGLE_RAD);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_SPEAKER_NEXT_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(SUBWOFFER_ANGLE_RAD);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_SPEAKER_SAFE_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(SAFE_ZONE_ANGLE_RAD);}));
// Amp and Intake Buttons
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_AMP_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(AMP_ANGLE);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_GROUND_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(INTAKE_ANGLE);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_AMP_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(AMP_ANGLE_RAD);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_GROUND_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(INTAKE_ANGLE_RAD);}));
// Cimber Buttons
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_CLIMBER_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(CLIMBER_UP_ANGLE);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.LOWER_TO_CLIMBER_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(CLIMBER_DOWN_ANGLE);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.RAISE_TO_CLIMBER_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(CLIMBER_UP_ANGLE_RAD);}));
new JoystickButton(manipulatorController, Constants.OI.Manipulator.LOWER_TO_CLIMBER_BUTTON).onTrue(new InstantCommand(() -> {arm.setArmTarget(CLIMBER_DOWN_ANGLE_RAD);}));
}

public Command getAutonomousCommand() {
Expand Down

0 comments on commit 5ea8b8e

Please sign in to comment.