Allows multiple MotorController objects to be linked together.
More...
#include <frc/motorcontrol/MotorControllerGroup.h>
Allows multiple MotorController objects to be linked together.
◆ MotorControllerGroup() [1/3]
template<class... MotorControllers>
frc::MotorControllerGroup::MotorControllerGroup |
( |
MotorController & | motorController, |
|
|
MotorControllers &... | motorControllers ) |
|
inlineexplicit |
Create a new MotorControllerGroup with the provided MotorControllers.
- Template Parameters
-
- Parameters
-
motorController | The first MotorController to add |
motorControllers | The MotorControllers to add |
◆ MotorControllerGroup() [2/3]
frc::MotorControllerGroup::MotorControllerGroup |
( |
std::vector< std::reference_wrapper< MotorController > > && | motorControllers | ) |
|
|
explicit |
Create a new MotorControllerGroup with the provided MotorControllers.
- Parameters
-
motorControllers | The MotorControllers to add. |
◆ MotorControllerGroup() [3/3]
◆ Disable()
void frc::MotorControllerGroup::Disable |
( |
| ) |
|
|
overridevirtual |
◆ Get()
double frc::MotorControllerGroup::Get |
( |
| ) |
const |
|
overridevirtual |
Common interface for getting the current set speed of a motor controller.
- Returns
- The current set speed. Value is between -1.0 and 1.0.
Implements frc::MotorController.
◆ GetInverted()
bool frc::MotorControllerGroup::GetInverted |
( |
| ) |
const |
|
overridevirtual |
Common interface for returning the inversion state of a motor controller.
- Returns
- isInverted The state of inversion, true is inverted.
Implements frc::MotorController.
◆ InitSendable()
Initializes this Sendable object.
- Parameters
-
Implements wpi::Sendable.
◆ operator=()
◆ Set()
void frc::MotorControllerGroup::Set |
( |
double | speed | ) |
|
|
overridevirtual |
Common interface for setting the speed of a motor controller.
- Parameters
-
speed | The speed to set. Value should be between -1.0 and 1.0. |
Implements frc::MotorController.
◆ SetInverted()
void frc::MotorControllerGroup::SetInverted |
( |
bool | isInverted | ) |
|
|
overridevirtual |
Common interface for inverting direction of a motor controller.
- Parameters
-
isInverted | The state of inversion, true is inverted. |
Implements frc::MotorController.
◆ SetVoltage()
void frc::MotorControllerGroup::SetVoltage |
( |
units::volt_t | output | ) |
|
|
overridevirtual |
Sets the voltage output of the MotorController.
Compensates for the current bus voltage to ensure that the desired voltage is output even if the battery voltage is below 12V - highly useful when the voltage outputs are "meaningful" (e.g. they come from a feedforward calculation).
NOTE: This function must be called regularly in order for voltage compensation to work properly - unlike the ordinary set function, it is not "set it and forget it."
- Parameters
-
output | The voltage to output. |
Reimplemented from frc::MotorController.
◆ StopMotor()
void frc::MotorControllerGroup::StopMotor |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: