RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
MotorGroup.hpp
1#pragma once
2#include <functional>
3#include <initializer_list>
4#include <vector>
5
6#include "RaidZeroLib/api/Hardware/Motor.hpp"
7
8namespace rz {
9
17class MotorGroup final : public Motor {
18 public:
20 MotorGroup(std::initializer_list<std::reference_wrapper<Motor>> motors);
21
22 void setVoltage(Voltage voltage) override;
23 [[nodiscard]] bool connected() const override;
24
25 private:
26 std::vector<std::reference_wrapper<Motor>> motors;
27};
28
29} // namespace rz
void setVoltage(Voltage voltage) override
Commands a voltage, clamped to the motor's range. Positive drives the mechanism forward.
MotorGroup(std::initializer_list< std::reference_wrapper< Motor > > motors)
bool connected() const override
Motor()=default
au::QuantityD< au::Volts > Voltage
Definition Units.hpp:15
Definition DriverControl.hpp:11