RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
rz::MotorGroup Class Referencefinal

Several motors driving one mechanism, used as a single Motor. More...

#include <MotorGroup.hpp>

Inheritance diagram for rz::MotorGroup:
rz::Motor

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ MotorGroup()

rz::MotorGroup::MotorGroup ( std::initializer_list< std::reference_wrapper< Motor > > motors)
Exceptions
std::invalid_argumentif motors is empty.

Member Function Documentation

◆ connected()

bool rz::MotorGroup::connected ( ) const
nodiscardoverridevirtual

Implements rz::Motor.

◆ setVoltage()

void rz::MotorGroup::setVoltage ( Voltage voltage)
overridevirtual

Commands a voltage, clamped to the motor's range. Positive drives the mechanism forward.

Implements rz::Motor.


The documentation for this class was generated from the following file: