SynchronizedServo
SynchronizedServo
Class
The SynchronizedServo
class represents a pair of synchronized servos, which can be either regular servos or Axon servos.
On setup, you MUST start it at 90 degrees, or halfway through the servo rotation.
Constructor Parameters:
hw: HardwareMap
- The hardware map to initialize the servos.name: String
- The base name of the servos.axonServo: Boolean
- A flag indicating whether the servos are Axon servos.
Properties:
servo1: ServoPlus
- The first regular servo (ifaxonServo
is false).servo2: ServoPlus
- The second regular servo (ifaxonServo
is false).servo1Axon: AxonServo
- The first Axon servo (ifaxonServo
is true).servo2Axon: AxonServo
- The second Axon servo (ifaxonServo
is true).
Methods:
setPose(double pose)
- Sets the pose of the synchronized servos. IfaxonServo
is true, it sets the position of the Axon servos; otherwise, it sets the position of the regular servos.