New commands: add docs to end() (#2450)

Added documentation to prevent looping end() by scheduling commands.
This commit is contained in:
Starlight220
2020-03-28 19:18:06 +03:00
committed by GitHub
parent 1c28b729ad
commit d14978e549

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -37,6 +37,9 @@ public interface Command {
* The action to take when the command ends. Called when either the command finishes normally,
* or when it interrupted/canceled.
*
* <p>Do not schedule commands here that share requirements with this command.
* Use {@link #andThen(Command...)} instead.
*
* @param interrupted whether the command was interrupted/canceled
*/
default void end(boolean interrupted) {