mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[commands] Define order of parallel groups (#6602)
This commit is contained in:
@@ -132,8 +132,8 @@ CommandPtr CommandPtr::BeforeStarting(CommandPtr&& before) && {
|
||||
CommandPtr CommandPtr::WithTimeout(units::second_t duration) && {
|
||||
AssertValid();
|
||||
std::vector<std::unique_ptr<Command>> temp;
|
||||
temp.emplace_back(std::make_unique<WaitCommand>(duration));
|
||||
temp.emplace_back(std::move(m_ptr));
|
||||
temp.emplace_back(std::make_unique<WaitCommand>(duration));
|
||||
m_ptr = std::make_unique<ParallelRaceGroup>(std::move(temp));
|
||||
return std::move(*this);
|
||||
}
|
||||
@@ -141,8 +141,8 @@ CommandPtr CommandPtr::WithTimeout(units::second_t duration) && {
|
||||
CommandPtr CommandPtr::Until(std::function<bool()> condition) && {
|
||||
AssertValid();
|
||||
std::vector<std::unique_ptr<Command>> temp;
|
||||
temp.emplace_back(std::make_unique<WaitUntilCommand>(std::move(condition)));
|
||||
temp.emplace_back(std::move(m_ptr));
|
||||
temp.emplace_back(std::make_unique<WaitUntilCommand>(std::move(condition)));
|
||||
m_ptr = std::make_unique<ParallelRaceGroup>(std::move(temp));
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user