File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/main/java/org/usfirst/frc/team69/util Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1010import edu .wpi .first .wpilibj .command .InstantCommand ;
1111import edu .wpi .first .wpilibj .command .Subsystem ;
1212import edu .wpi .first .wpilibj .command .WaitCommand ;
13+ import edu .wpi .first .wpilibj .command .WaitForChildren ;
1314import edu .wpi .first .wpilibj .command .WaitUntilCommand ;
1415
1516/**
@@ -201,6 +202,17 @@ public CommandBuilder releaseAll() {
201202 return this ;
202203 }
203204
205+ /**
206+ * Wait for all running parallel commands to finish before executing the
207+ * next command.
208+ *
209+ * @return This CommandBuilder object
210+ */
211+ public CommandBuilder waitForChildren () {
212+ m_cmdGroup .addSequential (new WaitForChildren ());
213+ return this ;
214+ }
215+
204216 /**
205217 * Build a command. Note that for simplicity, calling this method
206218 * multiple times will return the same {@link Command} object. This
You can’t perform that action at this time.
0 commit comments