mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[commands] Fix compose-while-scheduled issue and test all compositions (#5581)
This commit is contained in:
@@ -56,7 +56,8 @@ class SelectCommand : public CommandHelper<Command, SelectCommand<Key>> {
|
||||
|
||||
m_defaultCommand.SetComposed(true);
|
||||
for (auto&& command : foo) {
|
||||
CommandScheduler::GetInstance().RequireUngrouped(command.second.get());
|
||||
CommandScheduler::GetInstance().RequireUngroupedAndUnscheduled(
|
||||
command.second.get());
|
||||
command.second.get()->SetComposed(true);
|
||||
}
|
||||
|
||||
@@ -77,7 +78,8 @@ class SelectCommand : public CommandHelper<Command, SelectCommand<Key>> {
|
||||
: m_selector{std::move(selector)} {
|
||||
m_defaultCommand.SetComposed(true);
|
||||
for (auto&& command : commands) {
|
||||
CommandScheduler::GetInstance().RequireUngrouped(command.second.get());
|
||||
CommandScheduler::GetInstance().RequireUngroupedAndUnscheduled(
|
||||
command.second.get());
|
||||
command.second.get()->SetComposed(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user