mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[command] Use addCommands in command group templates (#2900)
This makes the Java templates consistent with the C++ templates as well as the documentation Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
committed by
GitHub
parent
339d7445b3
commit
c11d34b26c
@@ -17,7 +17,8 @@ public class ReplaceMeParallelCommandGroup extends ParallelCommandGroup {
|
||||
* Creates a new ReplaceMeParallelCommandGroup.
|
||||
*/
|
||||
public ReplaceMeParallelCommandGroup() {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());super();
|
||||
// Add your commands in the addCommands() call, e.g.
|
||||
// addCommands(new FooCommand(), new BarCommand());
|
||||
addCommands();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ public class ReplaceMeParallelDeadlineGroup extends ParallelDeadlineGroup {
|
||||
* Creates a new ReplaceMeParallelDeadlineGroup.
|
||||
*/
|
||||
public ReplaceMeParallelDeadlineGroup() {
|
||||
// Add your commands in the super() call. Add the deadline first.
|
||||
super(
|
||||
new InstantCommand()
|
||||
);
|
||||
// Add the deadline command in the super() call. Add other commands using
|
||||
// addCommands().
|
||||
super(new InstantCommand());
|
||||
// addCommands(new FooCommand(), new BarCommand());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ public class ReplaceMeParallelRaceGroup extends ParallelRaceGroup {
|
||||
* Creates a new ReplaceMeParallelRaceGroup.
|
||||
*/
|
||||
public ReplaceMeParallelRaceGroup() {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
super();
|
||||
// Add your commands in the addCommands() call, e.g.
|
||||
// addCommands(new FooCommand(), new BarCommand());
|
||||
addCommands();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ public class ReplaceMeSequentialCommandGroup extends SequentialCommandGroup {
|
||||
* Creates a new ReplaceMeSequentialCommandGroup.
|
||||
*/
|
||||
public ReplaceMeSequentialCommandGroup() {
|
||||
// Add your commands in the super() call, e.g.
|
||||
// super(new FooCommand(), new BarCommand());
|
||||
super();
|
||||
// Add your commands in the addCommands() call, e.g.
|
||||
// addCommands(new FooCommand(), new BarCommand());
|
||||
addCommands();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user