NextFeedbackServo
class NextFeedbackServo(initializer: () -> ServoImplEx, feedbackName: String, cacheTolerance: Double = 0.01) : NextServo
A NextServo paired with an analog feedback input for reading the servo's actual angle. Useful for servos with a feedback wire (e.g. Axon).
Inherits everything from NextServo — position, pwmRange, enable(), disable() — and adds angle for reading the physical angle in radians from the feedback input.
Example:
val arm = NextFeedbackServo("armServo", "armEncoder")
arm.position = 0.5
val angle = arm.angleContent copied to clipboard
Parameters
initializer
A function returning the backing ServoImplEx. It will be invoked lazily the first time the servo is accessed.
feedbackName
Hardware map name of the analog input.
cacheTolerance
Tolerance for the NextServo position caching delegate.
Constructors
Link copied to clipboard
Constructor to create a NextFeedbackServo using a servo name.
Constructor to create a NextFeedbackServo using a LynxModule and port number.