Skip to content

Commit b54b5fb

Browse files
committed
started working on Autos file
1 parent 93450d3 commit b54b5fb

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/main/java/frc/robot/Robot.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ public class Robot extends TimedRobot {
4545

4646
// subsystems
4747
@Logged(name = "Swerve")
48-
private Swerve _swerve = TunerConstants.createDrivetrain();
48+
private final Swerve _swerve = TunerConstants.createDrivetrain();
4949

50-
private Command _autonomousCommand = Autos.none();
50+
private final Autos _autos = new Autos(_swerve);
51+
52+
private Command _autonomousCommand = none();
5153

5254
private final NetworkTableInstance _ntInst;
5355

src/main/java/frc/robot/commands/Autos.java

+6-9
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@
44

55
package frc.robot.commands;
66

7-
import static edu.wpi.first.wpilibj2.command.Commands.*;
7+
import frc.robot.subsystems.Swerve;
88

9-
import edu.wpi.first.wpilibj2.command.Command;
9+
public class Autos {
10+
private final Swerve _swerve;
1011

11-
public final class Autos {
12-
private Autos() {
13-
throw new UnsupportedOperationException("This is a utility class!");
12+
public Autos(Swerve swerve) {
13+
_swerve = swerve;
1414
}
1515

16-
/** An auto that doesn't do anything for 15 sec. */
17-
public static Command none() {
18-
return idle();
19-
}
16+
// TODO: add a simple path example
2017
}

0 commit comments

Comments
 (0)