diff --git a/src/main/deploy/pathplanner/autos/1-AmpSide-Leave.auto b/src/main/deploy/pathplanner/autos/1-AmpSide-Leave.auto index ae003cf..b83e34c 100644 --- a/src/main/deploy/pathplanner/autos/1-AmpSide-Leave.auto +++ b/src/main/deploy/pathplanner/autos/1-AmpSide-Leave.auto @@ -11,6 +11,12 @@ "type": "sequential", "data": { "commands": [ + { + "type": "named", + "data": { + "name": "Intake in" + } + }, { "type": "named", "data": { diff --git a/src/main/deploy/pathplanner/autos/4-Center-Stays.auto b/src/main/deploy/pathplanner/autos/4-Center-Stays.auto index 7d849f7..2964dc9 100644 --- a/src/main/deploy/pathplanner/autos/4-Center-Stays.auto +++ b/src/main/deploy/pathplanner/autos/4-Center-Stays.auto @@ -11,6 +11,12 @@ "type": "sequential", "data": { "commands": [ + { + "type": "named", + "data": { + "name": "Intake in" + } + }, { "type": "named", "data": { diff --git a/src/main/deploy/pathplanner/paths/Middle5thNote.path b/src/main/deploy/pathplanner/paths/Middle5thNote.path index 3fd72f1..cd26d17 100644 --- a/src/main/deploy/pathplanner/paths/Middle5thNote.path +++ b/src/main/deploy/pathplanner/paths/Middle5thNote.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 8.0, - "y": 0.75 + "x": 7.96240792481585, + "y": 0.5130810261620535 }, "prevControl": { - "x": 7.0, - "y": 0.75 + "x": 6.96240792481585, + "y": 0.5130810261620535 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/MoveOut-Left.path b/src/main/deploy/pathplanner/paths/MoveOut-Left.path index 014b5a9..2177a8c 100644 --- a/src/main/deploy/pathplanner/paths/MoveOut-Left.path +++ b/src/main/deploy/pathplanner/paths/MoveOut-Left.path @@ -16,28 +16,28 @@ }, { "anchor": { - "x": 3.45, - "y": 7.5 + "x": 2.157262600239487, + "y": 8.004064008128015 }, "prevControl": { - "x": 1.9500000000000002, - "y": 7.5 + "x": 0.6572626002394868, + "y": 8.004064008128015 }, "nextControl": { - "x": 4.950000000000003, - "y": 7.5 + "x": 3.6572626002394935, + "y": 8.004064008128015 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 7.0, - "y": 7.5 + "x": 7.1268188250662226, + "y": 7.81349105555354 }, "prevControl": { - "x": 6.0, - "y": 7.5 + "x": 6.1268188250662226, + "y": 7.81349105555354 }, "nextControl": null, "isLocked": false, diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 750c12d..09e625f 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -98,7 +98,7 @@ public static final class DriveConstants { public static final class IntakeConstants { public static final int kIntakeMotorID = 25; public static final int kArmMotorID = 39; - public static final int kArmEncoderChannel = 0; + public static final int kArmEncoderChannel = 1; // In degrees public static final double kIntakeLoweredAngle = -193; diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 2a8cd03..52e7e47 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -218,8 +218,11 @@ private void configureBindings() { })); // soft reset, should stop driving + // new JoystickButton(m_driverController, Button.kA.value) + // .onTrue(new InstantCommand(() -> m_intakeSubsystem.reset())); + new JoystickButton(m_driverController, Button.kA.value) - .onTrue(new InstantCommand(() -> m_intakeSubsystem.reset())); + .onTrue(new InstantCommand(() -> m_intakeSubsystem.resetEvenHarder())); // slightly harder reset new JoystickButton(m_driverController, Button.kB.value) @@ -229,6 +232,9 @@ private void configureBindings() { new JoystickButton(m_driverController, Button.kX.value) .onTrue(new InstantCommand(() -> m_intakeSubsystem.daveImSorry())); + new JoystickButton(m_driverController, Button.kBack.value) + .onTrue(new InstantCommand(() -> m_intakeSubsystem.heCantKillMeTwice())); + // new JoystickButton(m_driverController, Button.kX.value) // .onTrue(new InstantCommand(() -> { // // m_intakeSubsystem.getCurrentCommand().cancel(); diff --git a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java index ca54034..135bd94 100644 --- a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java @@ -71,11 +71,24 @@ public void resetHard() { m_armEncoder.reset(); } + public void resetEvenHarder() { + reset(); + + // m_armEncoder.reset(); + m_armEncoder.setPositionOffset(0.7); + // m_armEncoder.reset(); + } + /** just play some hans zimmer and hope he gets distracted */ public void daveImSorry() { IntakeConstants.kArmEncoderOffset = m_armEncoder.getAbsolutePosition(); } + /** i wish i was at the hans zimmer concert rn */ + public void heCantKillMeTwice() { + IntakeConstants.kArmEncoderOffset = m_armEncoder.getAbsolutePosition() - IntakeConstants.kIntakeLoweredAngle; + } + public void setArmPosition(ArmPosition position) { m_armPosition = position; switch (position) {