[commands] Fix compose-while-scheduled issue and test all compositions (#5581)

This commit is contained in:
Ryan Blue
2023-12-23 15:12:13 -05:00
committed by GitHub
parent aeb1a4aa33
commit ef1cb3f41e
20 changed files with 146 additions and 83 deletions

View File

@@ -9,7 +9,7 @@
using namespace frc2;
WrapperCommand::WrapperCommand(std::unique_ptr<Command>&& command) {
CommandScheduler::GetInstance().RequireUngrouped(command.get());
CommandScheduler::GetInstance().RequireUngroupedAndUnscheduled(command.get());
m_command = std::move(command);
m_command->SetComposed(true);
// copy the wrapped command's name