Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Starlight220 authored Dec 24, 2024
1 parent 0029a55 commit de7e986
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,16 @@ template <std::convertible_to<CommandPtr>... CommandPtrs>
CommandPtr Choose(std::function<void(wpi::Sendable*)> publish,
CommandPtrs&&... commands) {
auto chooser = std::make_shared<frc::SendableChooser<std::string_view>>();
((void)chooser->AddOption(commands.get()->GetName(), commands.get()->GetName()), ...);
((void)chooser->AddOption(commands.get()->GetName(),
commands.get()->GetName()),
...);
publish(chooser.get());
return Select<std::string_view>(
[sendableChooser = chooser]() mutable {
return sendableChooser->GetSelected();
},
std::pair{std::string_view{commands.get()->GetName()}, std::move(commands)}...);
std::pair{std::string_view{commands.get()->GetName()},
std::move(commands)}...);
}

/**
Expand Down

0 comments on commit de7e986

Please sign in to comment.