File tree Expand file tree Collapse file tree 1 file changed +14
-17
lines changed
Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -31,30 +31,27 @@ In this section we will be going over
3131## Creating a basic Autonomous Command
3232
3333!!! summary ""
34- ** 1)** Create a new command called ** Autonomous**
35-
36-
37- <details><summary>example</summary>
38- package frc.robot.commands;
39-
40- import edu.wpi.first.wpilibj.Timer;
41-
42- import edu.wpi.first.wpilibj2.command.Command;
43- import frc.robot.subsystems.CANDriveSubsystem;
44-
45- // Command to run the robot at 1/2 power for 1 second in autonomous
46- public class AutoCommand extends Command {
47-
48- }
49- <deatils>
34+ ** 1)** Create a new command called ** AutoCommand** using the ` create new class/command ` feature in Vscode.
35+
5036
5137!!! summary ""
5238 ** 2)** Before the constructor create a ** double** called ** distance**
39+ ```Java
40+ private Double distance;
41+ ```
5342
5443 - We will use this to tell the command to finish when the robot drives the inputted distance
44+
45+ **3)** Also create a **Timer** called `runtime`.
46+
47+ ```Java
48+ private Time runTime;
49+ ```
50+
51+ - This will be used to control how long the robot will move for.
5552
5653!!! summary ""
57- ** 3)** In the ** DriveDistance ** constructor add a ** double ** parameter called ** inches **
54+ ** 3)** In the ** AutoCommand ** constructor add a ** DriveSubsystem ** parameter called ** driveSubsystem **
5855
5956!!! summary ""
6057 ** 4)** Inside type:
You can’t perform that action at this time.
0 commit comments