Skip to content

Commit b7668fb

Browse files
authored
Merge pull request #16 from primo4586/feeder-intake
command group feeder intake
2 parents ba1c592 + 1cb3f1b commit b7668fb

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

src/main/java/frc/robot/Constants.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public static final class IntakeArm{ //TODO: This must be tuned to specific robo
5454
public static final double startingValue = 0;
5555
public static final double zeroEncoderValue = 0;
5656
public static final double intakeArmSpeed = 0;
57+
public static final double intakeSetPoint = 0;
58+
public static final double trapSetPoint = 0;
5759
// switch
5860
public static final int switchID = 0;
5961

@@ -322,6 +324,7 @@ public static class FeederConstants{
322324
public static final double FeederMotorSpeed = 0.8;
323325
public static final double getNoteSpeed = 0;
324326

327+
325328
}
326329

327330
public static class TrapArmConstants{

src/main/java/frc/robot/commands/IntakeArmCommands/SetSpeed.java renamed to src/main/java/frc/robot/commands/IntakeArmCommands/IntakeArmSetSpeed.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
// NOTE: Consider using this command inline, rather than writing a subclass. For more
1111
// information, see:
1212
// https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html
13-
public class SetSpeed extends InstantCommand {
13+
public class IntakeArmSetSpeed extends InstantCommand {
1414
private final IntakeArmSubsystem intakeArm = IntakeArmSubsystem.getInstance();
1515
private double speed;
16-
public SetSpeed(double speed) {
16+
public IntakeArmSetSpeed(double speed) {
1717
// Use addRequirements() here to declare subsystem dependencies.
1818
this.speed = speed;
1919
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright (c) FIRST and other WPILib contributors.
2+
// Open Source Software; you can modify and/or share it under the terms of
3+
// the WPILib BSD license file in the root directory of this project.
4+
5+
package frc.robot.commands.feederCommands;
6+
7+
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
8+
import frc.robot.commands.IntakeArmCommands.MoveIntakeArmToDegree;
9+
import frc.robot.commands.IntakeCommands.CollectToFeeder;
10+
import frc.robot.commands.IntakeCommands.IntakeSetSpeed;
11+
import static frc.robot.Constants.IntakeArm.*;
12+
13+
// NOTE: Consider using this command inline, rather than writing a subclass. For more
14+
// information, see:
15+
// https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html
16+
public class FeederIntakeCommandGroup extends SequentialCommandGroup {
17+
18+
/** Creates a new FeederIntakeCommandGroup. */
19+
20+
public FeederIntakeCommandGroup() {
21+
// Add your commands in the addCommands() call, e.g.
22+
// addCommands(new FooCommand(), new BarCommand());
23+
addCommands(
24+
new MoveIntakeArmToDegree(intakeSetPoint),
25+
new CollectToFeeder(),
26+
new IntakeSetSpeed(0),
27+
new MoveIntakeArmToDegree(trapSetPoint));
28+
}
29+
}

0 commit comments

Comments
 (0)