Java Cheat Sheet
WPILIB Cheat Sheet
Commands
Commands can be created in multiple ways.
- As a class in a dedicated file ex
- They can also be created from within a subsystem with
this.run()
orthis.run_once()
ex - This can also be run from outside of a subsystem with
Commands.run()
orCommands.run_once()
- By creating a new
InstantCommand()
- additional instructions can be added on with
andThen()
Commands created in their own class can be used by creating an instance of that class. Commands created withthis.run()
in a subsystem can be returned in a function ex