Motor Group

The UvuvLib Motor Group Class

UvuvMotorGroup(std::vector<UvuvMotor*> motorContainerArg)

motorContainerArg - A Vector of pointers to Motors that you wish to be part of the Motor Group

Not Yet Implemented

UvuvMotorGroup(std::vector<std::pair<int, motorRotation>> motorParameters);

Not Yet Implemented

spinAtVoltage

Spins the all of the motors at the provided voltage

void spinAtVoltage(int voltage)

voltage - An integer between -12000 and 12000. This number determines the voltage that the motors will spin at

spinJoystick

Spins the all of the motors in increments of 1/127 of its total power

void spinJoystick(int joystickValue)

joystickValue - An integer between -127 and 127 that determines the power that the motors will spin at. This value would be the same one returned by a Joystick, hence the name of the function

spinPerc

Spins the all of the motors as a percentage of their total power

void spinPerc(int percent) 

percent - the percentage of the Total Power of the motors. Takes in an integer value between -100 to 100

spinPercVEXPID

Uses VEX Built in PID. Spins all of the motors as a percentage of their total power. (DO NOT USE WITH PID)

void spinPercVEXPID(int percent)

percent - the fraction of the Total Power of the motors. Takes in an integer value between -127 to 127.

spinAtRPM

Spins all of the motors at the given RPM.

void spinAtRPM(int RPM)

RPM - The Rotations Per Minute you desire the motors to move. Works through the PID Controller, so make sure that you assign one to this MotorGroup before using it.

spinUntilDegree

Spins all of the motors around for how many degrees you provide them.

void UvuvMotor::spinUntilDegree(int degree, int speedInVoltage)

degree - the amount of degrees you want the motors to spin.

speedInVoltage - An integer between -12000 and 12000. This number determines the voltage that the motors will spin at.

spinFor

Spins all of the motors for how many seconds you tell them to.

void spinFor(float seconds, int speedInVoltage)

seconds - the amount of time in seconds that the motors will spin for

speedInVoltage - An integer between -12000 and 12000. This number determines the voltage that the motors will spin at.

logMotorPreference

Not yet Implemented

set_zero_position

Sets the position of the all of the Motors.

void set_zero_position(int position)

position - Sets the absolute position of the motors to position

shutDown

Shuts down all of the Motors.

void shutDown()

Revive

Enables all of the Motors.

void revive()

getIsBroken

Returns a Vector of each Motors' isBroken states.

std::vector<bool> getIsBroken()

getIndividualRPM

Returns a Vector of each Motors' Rotations Per Minute.

std::vector<float> getIndividualRPM()

getAverageRPM

Returns the average Rotations Per Minute the Motors are doing now.

float getAverageRPM()

getVoltage

Returns the average Voltage of the Motors

float getVoltage()

getDrivePID

Returns a Pointer to the DrivePID

PIDController* getDrivePID()

getTurnPID

Returns a Pointer to the TurnPID

PIDController* getTurnPID()

assignDrivePID

(Uvuv Comment) - both this function and the one bellow do not return True or False. Either make the function void or have it return an error state as true or false

Assigns the DrivePID, given a PIDController

bool assignDrivePID(PIDController pid)

pid - A PIDController you wish to become the DrivePID of this Motor Group

assignTurnPID

Assigns the TurnPID, given a PIDController.

bool assignTurnPID(PIDController pid)

pid - A PIDController you wish to become the TurnPID of this Motor Group.

getAverageEncoderPositions

Gets the average encoder Positions of the Motors in degrees.

float getAverageEncoderPositions()

Last updated