Skip to content

Commit 512f4a2

Browse files
committed
created the outline for all commands
1 parent 751b17a commit 512f4a2

32 files changed

+1327
-137
lines changed

src/main/java/frc/robot/RobotContainer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public class RobotContainer {
2525
private final SN_XboxController conDriver = new SN_XboxController(mapControllers.DRIVER_USB);
2626

2727
private final Drivetrain subDrivetrain = new Drivetrain();
28-
private final StateMachine subStateMachine = new StateMachine(subDrivetrain);
28+
private final Intake subIntake = new Intake();
29+
private final Climber subClimber = new Climber();
30+
private final Elevator subElevator = new Elevator();
31+
private final StateMachine subStateMachine = new StateMachine(subDrivetrain, subIntake, subClimber, subElevator);
2932
private final RobotPoses robotPose = new RobotPoses(subDrivetrain);
3033

3134
Command TRY_NONE = Commands.deferredProxy(
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class CleanHigh extends Command {
12+
StateMachine globalStateMachine;
13+
14+
public CleanHigh(StateMachine globalStateMachine) {
15+
// Use addRequirements() here to declare subsystem dependencies.
16+
this.globalStateMachine = globalStateMachine;
17+
addRequirements(globalStateMachine);
18+
}
19+
20+
// Called when the command is initially scheduled.
21+
@Override
22+
public void initialize() {
23+
}
24+
25+
// Called every time the scheduler runs while the command is scheduled.
26+
@Override
27+
public void execute() {
28+
}
29+
30+
// Called once the command ends or is interrupted.
31+
@Override
32+
public void end(boolean interrupted) {
33+
}
34+
35+
// Returns true when the command should end.
36+
@Override
37+
public boolean isFinished() {
38+
return false;
39+
}
40+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class CleanHighWithCoral extends Command {
12+
/** Creates a new CleanHighWithCoral. */
13+
StateMachine globalStateMachine;
14+
15+
public CleanHighWithCoral(StateMachine globalStateMachine) {
16+
// Use addRequirements() here to declare subsystem dependencies.
17+
this.globalStateMachine = globalStateMachine;
18+
addRequirements(globalStateMachine);
19+
}
20+
21+
// Called when the command is initially scheduled.
22+
@Override
23+
public void initialize() {
24+
}
25+
26+
// Called every time the scheduler runs while the command is scheduled.
27+
@Override
28+
public void execute() {
29+
}
30+
31+
// Called once the command ends or is interrupted.
32+
@Override
33+
public void end(boolean interrupted) {
34+
}
35+
36+
// Returns true when the command should end.
37+
@Override
38+
public boolean isFinished() {
39+
return false;
40+
}
41+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class CleanLow extends Command {
12+
StateMachine globalStateMachine;
13+
14+
public CleanLow(StateMachine globalStateMachine) {
15+
// Use addRequirements() here to declare subsystem dependencies.
16+
this.globalStateMachine = globalStateMachine;
17+
addRequirements(globalStateMachine);
18+
}
19+
20+
// Called when the command is initially scheduled.
21+
@Override
22+
public void initialize() {
23+
}
24+
25+
// Called every time the scheduler runs while the command is scheduled.
26+
@Override
27+
public void execute() {
28+
}
29+
30+
// Called once the command ends or is interrupted.
31+
@Override
32+
public void end(boolean interrupted) {
33+
}
34+
35+
// Returns true when the command should end.
36+
@Override
37+
public boolean isFinished() {
38+
return false;
39+
}
40+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class CleanLowWithCoral extends Command {
12+
/** Creates a new CleanLowWithCoral. */
13+
StateMachine globalStateMachine;
14+
15+
public CleanLowWithCoral(StateMachine globalStateMachine) {
16+
// Use addRequirements() here to declare subsystem dependencies.
17+
this.globalStateMachine = globalStateMachine;
18+
addRequirements(globalStateMachine);
19+
}
20+
21+
// Called when the command is initially scheduled.
22+
@Override
23+
public void initialize() {
24+
}
25+
26+
// Called every time the scheduler runs while the command is scheduled.
27+
@Override
28+
public void execute() {
29+
}
30+
31+
// Called once the command ends or is interrupted.
32+
@Override
33+
public void end(boolean interrupted) {
34+
}
35+
36+
// Returns true when the command should end.
37+
@Override
38+
public boolean isFinished() {
39+
return false;
40+
}
41+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class Climbing extends Command {
12+
StateMachine globalStateMachine;
13+
14+
public Climbing(StateMachine globalStateMachine) {
15+
// Use addRequirements() here to declare subsystem dependencies.
16+
this.globalStateMachine = globalStateMachine;
17+
addRequirements(globalStateMachine);
18+
}
19+
20+
// Called when the command is initially scheduled.
21+
@Override
22+
public void initialize() {
23+
}
24+
25+
// Called every time the scheduler runs while the command is scheduled.
26+
@Override
27+
public void execute() {
28+
}
29+
30+
// Called once the command ends or is interrupted.
31+
@Override
32+
public void end(boolean interrupted) {
33+
}
34+
35+
// Returns true when the command should end.
36+
@Override
37+
public boolean isFinished() {
38+
return false;
39+
}
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class Ejecting extends Command {
12+
StateMachine globalStateMachine;
13+
14+
public Ejecting(StateMachine globalStateMachine) {
15+
// Use addRequirements() here to declare subsystem dependencies.
16+
this.globalStateMachine = globalStateMachine;
17+
addRequirements(globalStateMachine);
18+
}
19+
20+
// Called when the command is initially scheduled.
21+
@Override
22+
public void initialize() {
23+
}
24+
25+
// Called every time the scheduler runs while the command is scheduled.
26+
@Override
27+
public void execute() {
28+
}
29+
30+
// Called once the command ends or is interrupted.
31+
@Override
32+
public void end(boolean interrupted) {
33+
}
34+
35+
// Returns true when the command should end.
36+
@Override
37+
public boolean isFinished() {
38+
return false;
39+
}
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class HasAlgae extends Command {
12+
StateMachine globalStateMachine;
13+
14+
public HasAlgae(StateMachine globalStateMachine) {
15+
// Use addRequirements() here to declare subsystem dependencies.
16+
this.globalStateMachine = globalStateMachine;
17+
addRequirements(globalStateMachine);
18+
}
19+
20+
// Called when the command is initially scheduled.
21+
@Override
22+
public void initialize() {
23+
}
24+
25+
// Called every time the scheduler runs while the command is scheduled.
26+
@Override
27+
public void execute() {
28+
}
29+
30+
// Called once the command ends or is interrupted.
31+
@Override
32+
public void end(boolean interrupted) {
33+
}
34+
35+
// Returns true when the command should end.
36+
@Override
37+
public boolean isFinished() {
38+
return false;
39+
}
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class HasCoral extends Command {
12+
StateMachine globalStateMachine;
13+
14+
public HasCoral(StateMachine globalStateMachine) {
15+
// Use addRequirements() here to declare subsystem dependencies.
16+
this.globalStateMachine = globalStateMachine;
17+
addRequirements(globalStateMachine);
18+
}
19+
20+
// Called when the command is initially scheduled.
21+
@Override
22+
public void initialize() {
23+
}
24+
25+
// Called every time the scheduler runs while the command is scheduled.
26+
@Override
27+
public void execute() {
28+
}
29+
30+
// Called once the command ends or is interrupted.
31+
@Override
32+
public void end(boolean interrupted) {
33+
}
34+
35+
// Returns true when the command should end.
36+
@Override
37+
public boolean isFinished() {
38+
return false;
39+
}
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.States;
6+
7+
import edu.wpi.first.wpilibj2.command.Command;
8+
import frc.robot.subsystems.StateMachine;
9+
10+
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
11+
public class HasCoralAndAlgae extends Command {
12+
StateMachine globalStateMachine;
13+
14+
public HasCoralAndAlgae(StateMachine globalStateMachine) {
15+
// Use addRequirements() here to declare subsystem dependencies.
16+
this.globalStateMachine = globalStateMachine;
17+
addRequirements(globalStateMachine);
18+
}
19+
20+
// Called when the command is initially scheduled.
21+
@Override
22+
public void initialize() {
23+
}
24+
25+
// Called every time the scheduler runs while the command is scheduled.
26+
@Override
27+
public void execute() {
28+
}
29+
30+
// Called once the command ends or is interrupted.
31+
@Override
32+
public void end(boolean interrupted) {
33+
}
34+
35+
// Returns true when the command should end.
36+
@Override
37+
public boolean isFinished() {
38+
return false;
39+
}
40+
}

0 commit comments

Comments
 (0)