Skip to content

Commit

Permalink
Bordie Day 2 changes - I am still the only programmer...
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammingSR committed Oct 7, 2024
1 parent 1bb831c commit bc59919
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 16 deletions.
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/1-AmpSide-Leave.auto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Intake in"
}
},
{
"type": "named",
"data": {
Expand Down
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/4-Center-Stays.auto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Intake in"
}
},
{
"type": "named",
"data": {
Expand Down
8 changes: 4 additions & 4 deletions src/main/deploy/pathplanner/paths/Middle5thNote.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 10 additions & 10 deletions src/main/deploy/pathplanner/paths/MoveOut-Left.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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();
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/frc/robot/subsystems/IntakeSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bc59919

Please sign in to comment.