mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[commands] Update Subsystem factories and example to return CommandBase (#4729)
Also update rapidreactcommandbot example factories to fit this convention (as in #4655). C++ does not need an update as CommandPtr already uses CommandBase (#4677).
This commit is contained in:
@@ -85,7 +85,7 @@ public interface Subsystem {
|
||||
* @return the command
|
||||
* @see InstantCommand
|
||||
*/
|
||||
default Command runOnce(Runnable action) {
|
||||
default CommandBase runOnce(Runnable action) {
|
||||
return Commands.runOnce(action, this);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public interface Subsystem {
|
||||
* @return the command
|
||||
* @see RunCommand
|
||||
*/
|
||||
default Command run(Runnable action) {
|
||||
default CommandBase run(Runnable action) {
|
||||
return Commands.run(action, this);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public interface Subsystem {
|
||||
* @return the command
|
||||
* @see StartEndCommand
|
||||
*/
|
||||
default Command startEnd(Runnable start, Runnable end) {
|
||||
default CommandBase startEnd(Runnable start, Runnable end) {
|
||||
return Commands.startEnd(start, end, this);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public interface Subsystem {
|
||||
* @param end the action to run on interrupt
|
||||
* @return the command
|
||||
*/
|
||||
default Command runEnd(Runnable run, Runnable end) {
|
||||
default CommandBase runEnd(Runnable run, Runnable end) {
|
||||
return Commands.runEnd(run, end, this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user