![]() |
RaidZeroLib
Coroutine robot framework for VEX V5
|
Several motors driving one mechanism, used as a single Motor. More...
#include <MotorGroup.hpp>
Public Member Functions | |
| MotorGroup (std::initializer_list< std::reference_wrapper< Motor > > motors) | |
| void | setVoltage (Voltage voltage) override |
| Commands a voltage, clamped to the motor's range. Positive drives the mechanism forward. | |
| bool | connected () const override |
| Public Member Functions inherited from rz::Motor | |
| Motor ()=default | |
| Motor (const Motor &)=delete | |
| Motor & | operator= (const Motor &)=delete |
| Motor (Motor &&)=delete | |
| Motor & | operator= (Motor &&)=delete |
| virtual | ~Motor ()=default |
Several motors driving one mechanism, used as a single Motor.
Each member's direction is set on the member itself, so motors facing opposite ways can share a group. The group counts as connected while any member is, so a mechanism keeps working with a motor unplugged; each motor logs its own disconnects.
| rz::MotorGroup::MotorGroup | ( | std::initializer_list< std::reference_wrapper< Motor > > | motors | ) |
| std::invalid_argument | if motors is empty. |
|
nodiscardoverridevirtual |
Implements rz::Motor.
|
overridevirtual |
Commands a voltage, clamped to the motor's range. Positive drives the mechanism forward.
Implements rz::Motor.