-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package frc.robot.pseudoCode; | ||
|
||
import static frc.robot.pseudoCode.PseudoCodeActions.*; | ||
|
||
public class CodeRunner { | ||
|
||
public static void main(String[] args) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package frc.robot.pseudoCode; | ||
|
||
import frc.robot.auton.AutonAction; | ||
import frc.robot.auton.AutonMoveInches; | ||
import frc.robot.auton.AutonRotateWithPIDCommand; | ||
import frc.robot.auton.AutonShoot; | ||
import frc.robot.auton.AutonShooterFeed; | ||
import frc.robot.auton.ExtendArms; | ||
import frc.robot.auton.RetractArms; | ||
import java.util.ArrayDeque; | ||
|
||
public class PseudoCodeActions { | ||
|
||
public static ArrayDeque<AutonAction> pseudoCodeActionQueue = new ArrayDeque<>(); | ||
|
||
public static void addAction(AutonAction action) { | ||
pseudoCodeActionQueue.add(action); | ||
} | ||
|
||
public static void moveForwards(int inches) { | ||
addAction(new AutonMoveInches(inches)); | ||
} | ||
|
||
public static void moveBackwards(int inches) { | ||
addAction(new AutonMoveInches(-inches)); | ||
} | ||
|
||
public static void rotateRight(double degrees) { | ||
addAction(new AutonRotateWithPIDCommand(degrees)); | ||
} | ||
|
||
public static void rotateLeft(double degrees) { | ||
addAction(new AutonRotateWithPIDCommand(-degrees)); | ||
} | ||
|
||
public static void shoot() { | ||
addAction(new AutonShoot()); | ||
} | ||
|
||
public static void feed() { | ||
addAction(new AutonShooterFeed()); | ||
} | ||
|
||
public static void raiseArms() { | ||
addAction(new ExtendArms()); | ||
} | ||
|
||
public static void lowerArms() { | ||
addAction(new RetractArms()); | ||
} | ||
} |