Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit abf61cc

Browse files
committed
2 parents 8f9251c + 31e85ae commit abf61cc

12 files changed

Lines changed: 258 additions & 78 deletions

Robot2018/src/org/usfirst/frc/team199/Robot2018/DashboardInterface.java

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}

Robot2018/src/org/usfirst/frc/team199/Robot2018/commands/AutonomousInterface.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package org.usfirst.frc.team199.Robot2018.commands;
22

3-
import org.usfirst.frc.team199.Robot2018.DashboardInterface;
43

5-
import edu.wpi.first.wpilibj.DriverStation;
6-
7-
public interface AutonomousInterface extends DashboardInterface{
4+
public interface AutonomousInterface {
85
public enum Position {
96
LEFT,
107
CENTER,
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}

Robot2018/src/org/usfirst/frc/team199/Robot2018/commands/RunScript.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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());

0 commit comments

Comments
 (0)