package com.seattlesolvers.solverslib.solversHardware
Each SolversHardware class has a second parameter called powerThreshold
. If the power set to that hardware is less than that threshold, it will not send a hardware write. The intent of this is to reduce the amount of unnecessary hardware writes.
SolversMotor takes a DcMotor as a parameter. As such, you can create the DcMotor seperately or put it inside the SolversMotor.
SolversServo takes a Servo as a parameter. As such, you can create the Servo seperately or put it inside the SolversServo.
SolversCRServo takes a CRServo as a parameter. As such, you can create the CRServo seperately or put it inside the SolversCRServo.
SolversAxonServo, is similar to a CRServo, and features caching.
But not only that, it also features easy usage of the Axon absolute encoder. To set it to an absoluteEncoder plugged into a hub's AnalogInput, simply call setServoEncoder(AnalogInput absoluteEncoder)
:
You can also seperate the AnalogInput
if desired.
If you instead want the Axon Servo's normalized position (degrees), callsolversAxonServo.getPosition()
instead. This returns the position in degrees minus an offset (default offset is 0).
To set a custom offset other than, you can call solversAxonServo.setOffset(double offset)
.