This repository was archived by the owner on Sep 14, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Robot2018/src/org/usfirst/frc/team199/Robot2018/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package org .usfirst .frc .team199 .Robot2018 .commands ;
2+
3+ import edu .wpi .first .wpilibj .command .Command ;
4+
5+ /**
6+ *
7+ */
8+ public class AutoMove extends Command {
9+
10+ public AutoMove (double distance ) {
11+ // Use requires() here to declare subsystem dependencies
12+ // eg. requires(chassis);
13+ }
14+
15+ // Called just before this Command runs the first time
16+ protected void initialize () {
17+ }
18+
19+ // Called repeatedly when this Command is scheduled to run
20+ protected void execute () {
21+ }
22+
23+ // Make this return true when this Command no longer needs to run execute()
24+ protected boolean isFinished () {
25+ return false ;
26+ }
27+
28+ // Called once after isFinished returns true
29+ protected void end () {
30+ }
31+
32+ // Called when another command which requires one or more of the same
33+ // subsystems is scheduled to run
34+ protected void interrupted () {
35+ }
36+ }
Original file line number Diff line number Diff line change 1+ package org .usfirst .frc .team199 .Robot2018 .commands ;
2+
3+ import edu .wpi .first .wpilibj .command .Command ;
4+
5+ /**
6+ *
7+ */
8+ public class AutoMoveTo extends Command {
9+
10+ public AutoMoveTo (String [] points ) {
11+ // Use requires() here to declare subsystem dependencies
12+ // eg. requires(chassis);
13+ }
14+
15+ // Called just before this Command runs the first time
16+ protected void initialize () {
17+ }
18+
19+ // Called repeatedly when this Command is scheduled to run
20+ protected void execute () {
21+ }
22+
23+ // Make this return true when this Command no longer needs to run execute()
24+ protected boolean isFinished () {
25+ return false ;
26+ }
27+
28+ // Called once after isFinished returns true
29+ protected void end () {
30+ }
31+
32+ // Called when another command which requires one or more of the same
33+ // subsystems is scheduled to run
34+ protected void interrupted () {
35+ }
36+ }
Original file line number Diff line number Diff line change 1+ package org .usfirst .frc .team199 .Robot2018 .commands ;
2+
3+ import edu .wpi .first .wpilibj .command .Command ;
4+
5+ /**
6+ *
7+ */
8+ public class AutoTurn extends Command {
9+
10+ public AutoTurn (double angle ) {
11+ // Use requires() here to declare subsystem dependencies
12+ // eg. requires(chassis);
13+ }
14+
15+ // Called just before this Command runs the first time
16+ protected void initialize () {
17+ }
18+
19+ // Called repeatedly when this Command is scheduled to run
20+ protected void execute () {
21+ }
22+
23+ // Make this return true when this Command no longer needs to run execute()
24+ protected boolean isFinished () {
25+ return false ;
26+ }
27+
28+ // Called once after isFinished returns true
29+ protected void end () {
30+ }
31+
32+ // Called when another command which requires one or more of the same
33+ // subsystems is scheduled to run
34+ protected void interrupted () {
35+ }
36+ }
Original file line number Diff line number Diff line change 1+ package org .usfirst .frc .team199 .Robot2018 .commands ;
2+
3+ import edu .wpi .first .wpilibj .command .Command ;
4+
5+ /**
6+ *
7+ */
8+ public class EjectToExchange extends Command {
9+
10+ public EjectToExchange () {
11+ // Use requires() here to declare subsystem dependencies
12+ // eg. requires(chassis);
13+ }
14+
15+ // Called just before this Command runs the first time
16+ protected void initialize () {
17+ }
18+
19+ // Called repeatedly when this Command is scheduled to run
20+ protected void execute () {
21+ }
22+
23+ // Make this return true when this Command no longer needs to run execute()
24+ protected boolean isFinished () {
25+ return false ;
26+ }
27+
28+ // Called once after isFinished returns true
29+ protected void end () {
30+ }
31+
32+ // Called when another command which requires one or more of the same
33+ // subsystems is scheduled to run
34+ protected void interrupted () {
35+ }
36+ }
Original file line number Diff line number Diff line change 1+ package org .usfirst .frc .team199 .Robot2018 .commands ;
2+
3+ import edu .wpi .first .wpilibj .command .Command ;
4+
5+ /**
6+ *
7+ */
8+ public class EjectToScale extends Command {
9+
10+ public EjectToScale () {
11+ // Use requires() here to declare subsystem dependencies
12+ // eg. requires(chassis);
13+ }
14+
15+ // Called just before this Command runs the first time
16+ protected void initialize () {
17+ }
18+
19+ // Called repeatedly when this Command is scheduled to run
20+ protected void execute () {
21+ }
22+
23+ // Make this return true when this Command no longer needs to run execute()
24+ protected boolean isFinished () {
25+ return false ;
26+ }
27+
28+ // Called once after isFinished returns true
29+ protected void end () {
30+ }
31+
32+ // Called when another command which requires one or more of the same
33+ // subsystems is scheduled to run
34+ protected void interrupted () {
35+ }
36+ }
Original file line number Diff line number Diff line change 1+ package org .usfirst .frc .team199 .Robot2018 .commands ;
2+
3+ import edu .wpi .first .wpilibj .command .Command ;
4+
5+ /**
6+ *
7+ */
8+ public class EjectToSwitch extends Command {
9+
10+ public EjectToSwitch () {
11+ // Use requires() here to declare subsystem dependencies
12+ // eg. requires(chassis);
13+ }
14+
15+ // Called just before this Command runs the first time
16+ protected void initialize () {
17+ }
18+
19+ // Called repeatedly when this Command is scheduled to run
20+ protected void execute () {
21+ }
22+
23+ // Make this return true when this Command no longer needs to run execute()
24+ protected boolean isFinished () {
25+ return false ;
26+ }
27+
28+ // Called once after isFinished returns true
29+ protected void end () {
30+ }
31+
32+ // Called when another command which requires one or more of the same
33+ // subsystems is scheduled to run
34+ protected void interrupted () {
35+ }
36+ }
Original file line number Diff line number Diff line change 1+ package org .usfirst .frc .team199 .Robot2018 .commands ;
2+
3+ import edu .wpi .first .wpilibj .command .Command ;
4+
5+ /**
6+ *
7+ */
8+ public class IntakeCube extends Command {
9+
10+ public IntakeCube () {
11+ // Use requires() here to declare subsystem dependencies
12+ // eg. requires(chassis);
13+ }
14+
15+ // Called just before this Command runs the first time
16+ protected void initialize () {
17+ }
18+
19+ // Called repeatedly when this Command is scheduled to run
20+ protected void execute () {
21+ }
22+
23+ // Make this return true when this Command no longer needs to run execute()
24+ protected boolean isFinished () {
25+ return false ;
26+ }
27+
28+ // Called once after isFinished returns true
29+ protected void end () {
30+ }
31+
32+ // Called when another command which requires one or more of the same
33+ // subsystems is scheduled to run
34+ protected void interrupted () {
35+ }
36+ }
Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ public RunScript(String scriptName) {
2929 addSequential (new AutoMoveTo (cmdArgs ));
3030 break ;
3131 case "turn" :
32- addSequential (new AutoTurn (cmdArgs [0 ]));
32+ addSequential (new AutoTurn (Double . parseDouble ( cmdArgs [0 ]) ));
3333 break ;
3434 case "move" :
35- addSequential (new AutoMove (cmdArgs [0 ]));
35+ addSequential (new AutoMove (Double . parseDouble ( cmdArgs [0 ]) ));
3636 break ;
3737 case "switch" :
3838 addSequential (new EjectToSwitch ());
You can’t perform that action at this time.
0 commit comments