Skip to content

Commit

Permalink
fixed 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Scorchify committed Dec 7, 2024
1 parent c8e02ae commit 1ef6eed
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
14 changes: 13 additions & 1 deletion src/main/deploy/pathplanner/autos/3 Stack .auto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"x": 1.225,
"y": 5.2
},
"rotation": 7.138798805037105e-26
"rotation": -1.858513390606092e-27
},
"command": {
"type": "sequential",
Expand All @@ -21,6 +21,12 @@
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "IntakeSetpoint"
}
},
{
"type": "race",
"data": {
Expand Down Expand Up @@ -66,6 +72,12 @@
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "IntakeSetpoint"
}
},
{
"type": "race",
"data": {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/frc/team5115/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ private void configureButtonBindings() {
joyDrive.a().onTrue(Commands.runOnce(() -> slowMode = !slowMode));

joyManip.a().onTrue(DriveCommands.intakeUntilCanister(dispenser, arm));
joyManip.b().onTrue(DriveCommands.vaultIntake(dispenser,arm));

// joyManip
// .b()
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/frc/team5115/commands/DriveCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ public static Command intakeUntilCanister(Dispenser dispenser, Arm arm) {
dispenser.intake(), arm.intake(), dispenser.waitTillCanister(), dispenser.stop());
}

public static Command vaultIntake(Dispenser dispenser, Arm arm) {
return Commands.sequence(
dispenser.intake(), arm.vaultIntake(), dispenser.waitTillCanister(), dispenser.stop());
}



public static Command stow(Dispenser dispenser, Arm arm) {
return Commands.parallel(dispenser.stop(), arm.stow());
}
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/frc/team5115/subsystems/arm/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public enum State {
STOWED(+66.0),
INTAKE(-25.0),
DISPENSE(+150.0),
STACK(+180.0); // TODO add accurate stack position
STACK(+180.0), // TODO add accurate stack position
VAULTINTAKE(5);

private final double position;

Expand Down Expand Up @@ -130,6 +131,10 @@ public Command intake() {
return setState(State.INTAKE);
}

public Command vaultIntake() {
return setState(State.VAULTINTAKE);
}

// manipulate arm with joystic
public void goAtVoltage(double speed) {
io.setArmVoltage(speed * maxVolts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ArmIOSparkMax() {
absoluteEncoder.setPositionConversionFactor(360);
absoluteEncoder.setInverted(true);
motor.setInverted(false);
motor.setSmartCurrentLimit(30);
motor.setSmartCurrentLimit(50);
motor.burnFlash();
}

Expand Down

0 comments on commit 1ef6eed

Please sign in to comment.