Add dependency injection of Subsystem to Command (#1275)

This commit is contained in:
Matt Soucy
2018-08-19 22:43:21 -04:00
committed by Peter Johnson
parent 6df500e726
commit e28295fc7b
12 changed files with 291 additions and 2 deletions

View File

@@ -35,6 +35,23 @@ class TimedCommand : public Command {
*/
explicit TimedCommand(double timeout);
/**
* Creates a new TimedCommand with the given name and timeout.
*
* @param name the name of the command
* @param timeout the time (in seconds) before this command "times out"
* @param requirement the subsystem that the command requires
*/
TimedCommand(const wpi::Twine& name, double timeout, Subsystem& requirement);
/**
* Creates a new WaitCommand with the given timeout.
*
* @param timeout the time (in seconds) before this command "times out"
* @param requirement the subsystem that the command requires
*/
TimedCommand(double timeout, Subsystem& requirement);
virtual ~TimedCommand() = default;
protected: