mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
This allows the list to be constructed dynamically. Co-authored-by: Thad House <thadhouse1@gmail.com>
24 lines
886 B
C++
24 lines
886 B
C++
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
/* the project. */
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
#pragma once
|
|
|
|
#include <functional>
|
|
#include <vector>
|
|
|
|
namespace frc {
|
|
|
|
template <class... SpeedControllers>
|
|
SpeedControllerGroup::SpeedControllerGroup(
|
|
SpeedController& speedController, SpeedControllers&... speedControllers)
|
|
: m_speedControllers(std::vector<std::reference_wrapper<SpeedController>>{
|
|
speedController, speedControllers...}) {
|
|
Initialize();
|
|
}
|
|
|
|
} // namespace frc
|