Fix some PIDCommand constructors not forwarding subsystems (#1299)

Also added missing constructor to wpilibc's InstantCommand and renamed
argument from requirement to subsystem as per
https://github.com/wpilibsuite/allwpilib/pull/1275#issuecomment-416071940.
This commit is contained in:
Tyler Veness
2018-09-02 14:18:12 -07:00
committed by Peter Johnson
parent c8482cd6d2
commit 0b113ad9ce
12 changed files with 119 additions and 113 deletions

View File

@@ -27,13 +27,20 @@ class InstantCommand : public Command {
*/
explicit InstantCommand(const wpi::Twine& name);
/**
* Creates a new InstantCommand with the given requirement.
*
* @param subsystem The subsystem that the command requires
*/
explicit InstantCommand(Subsystem& subsystem);
/**
* Creates a new InstantCommand with the given name.
*
* @param name The name for this command
* @param requirement The subsystem that the command requires
* @param name The name for this command
* @param subsystem The subsystem that the command requires
*/
InstantCommand(const wpi::Twine& name, Subsystem& requirement);
InstantCommand(const wpi::Twine& name, Subsystem& subsystem);
InstantCommand() = default;
virtual ~InstantCommand() = default;