[commands] Allow unsetting a subsystem's default command (#4621)

This commit is contained in:
Colin Wong
2022-11-28 16:03:14 -06:00
committed by GitHub
parent 2b2aa8eef7
commit ec124bb662
3 changed files with 38 additions and 0 deletions

View File

@@ -200,6 +200,15 @@ class CommandScheduler final : public nt::NTSendable,
*/
void SetDefaultCommand(Subsystem* subsystem, CommandPtr&& defaultCommand);
/**
* Removes the default command for a subsystem. The current default command
* will run until another command is scheduled that requires the subsystem, at
* which point the current default command will not be re-scheduled.
*
* @param subsystem the subsystem whose default command will be removed
*/
void RemoveDefaultCommand(Subsystem* subsystem);
/**
* Gets the default command associated with this subsystem. Null if this
* subsystem has no default command associated with it.