Templates
Subsystem Template
public class ExampleSubsystem extends SubsystemBase {
public ExampleSubsystem() { /* init hardware + configs */ }
public Command defaultHold() { return Commands.run(() -> {/* hold */}, this); }
public Command percent(DoubleSupplier pct) { /* ... */ return Commands.none(); }
}
Command Group Template
public Command exampleMacro() {
return Commands.sequence(
cmd1(),
Commands.deadline(timeoutCmd(), parallelCmdA(), parallelCmdB())
);
}
Binding Template
void configureBindings() {
var driver = new CommandXboxController(0);
driver.a().onTrue(exampleMacro());
}