Lift Controllers
There are two Uvuv Lift Controllers- A Basic one, and an Advanced one.
UvuvBasicLift
The Uvuv Basic Lift is a really basic lift controller: you can move up, move down, and use PID to rotate to a degree.
(Uvuv Comment)- There are two constructors for this class in the cpp implementation, but there is only one declaration in the header file
An Uvuv Basic Lift takes in a pointer to a Motor Group, a pointer to a PIDFeedForwardController. Optionally, it takes a pointer to a PTO controller.
rotateLiftTo
Rotates the lift to a specified degree
degrees- The amount of degrees you wish to rotate the lift
rotateLiftByVoltage
Rotates the lift by a specified voltage
voltage - the amount of volts you wish to power the motors to go up
setPTO
Turns the PTO on or off
state - the state you wish the PTO to be in - True for on and off for false
UvuvAdvancedLift
The Uvuv Advanced Lift has more complex parameters and functionality. It can keep track of the game pieces in your lift for easy gain scheduling, and can move based on height, along with having all the functions the Uvuv Basic Lift has.
liftMotorsArg - Pointer to an UvuvMotorGroup object
pidFFControllerArg - Pointer to a PID Feed Forward Controller
defaultInchesFromGround - Default height of the lift from the ground
minimumHeightArg - The lowest your lift can possibly go
maximumHeightArg - The highest the lift can possibly go
OR
motorParameters - The port number and then the rotation direction of the lift motors
pidFFControllerArg - Pointer to a PID Feed Forward Controller
defaultInchesFromGround - Default height of the lift from the ground
minimumHeightArg - The lowest your lift can possibly go
maximumHeightArg - The highest the lift can possibly go
moveToMaxHeight
moves the lift to the Max Height Possible
moveToMinHeight
moves the lift to the Minimum height possible
moveToHeight
moves the lift to the height specified
inchesFromGround - The amount of inches from the ground that you want the lift to be raised to
getGamepiecesHeld
Get the number of gamepieces being held
grabGamepiece
(Uvuv Comment)- It would be better if you named this function addGamepieces- Notice the plural- because you do not add only one, like your Header Doc says this does. Same applies for the one below- dropGamepieces would be a better fit. In fact - It would probably be better if you merged the two functions - changeGamepieces - because these functions do pretty much the samething already.
Add count number of Gamepieces being held
count - The number of Gamepieces you wish to add
dropGamepiece
Subtract count number of Gamepieces being held
count - The number of Gamepieces you wish to subtract
Last updated