Lesson 2.?: run Command
// Example.java
public Command runCommand() {
return run(() -> {
// Do something every robot loop
}
}
// Robot.java
var example = new Example(mode != mode.REPLAY ? new ExampleIOPhoenix() : new ExampleIO() {});
primary.a().whileTrue(example.runCommand());Last updated
Was this helpful?