public class MatrixServoController extends java.lang.Object implements ServoController
ServoController.PwmStatusHardwareDevice.Manufacturer| Modifier and Type | Field and Description |
|---|---|
protected ServoController.PwmStatus |
pwmStatus |
static int |
SERVO_POSITION_MAX |
protected double[] |
servoCache |
| Constructor and Description |
|---|
MatrixServoController(MatrixMasterController master) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this device
|
java.lang.String |
getConnectionInfo()
Get connection information about this device in a human readable format
|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
HardwareDevice.Manufacturer |
getManufacturer()
Returns an indication of the manufacturer of this device.
|
ServoController.PwmStatus |
getPwmStatus()
Returns the enablement status of the collective set of servos connected to this controller
|
double |
getServoPosition(int channel)
Get the position of a servo at a given channel
|
int |
getVersion()
Version
|
void |
handleReadServo(MatrixI2cTransaction transaction,
byte[] buffer) |
void |
pwmDisable()
Disables all of the servos connected to this controller
|
void |
pwmEnable()
Enables all of the servos connected to this controller
|
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
void |
setServoPosition(int channel,
double position)
Set the position of a servo at the given channel
|
void |
setServoPosition(int channel,
double position,
byte speed) |
public static final int SERVO_POSITION_MAX
protected ServoController.PwmStatus pwmStatus
protected double[] servoCache
public MatrixServoController(MatrixMasterController master)
public void pwmEnable()
ServoControllerpwmEnable in interface ServoControllerpublic void pwmDisable()
ServoControllerpwmDisable in interface ServoControllerpublic ServoController.PwmStatus getPwmStatus()
ServoControllergetPwmStatus in interface ServoControllerpublic void setServoPosition(int channel,
double position)
ServoControllersetServoPosition in interface ServoControllerchannel - channel of servoposition - from 0.0 to 1.0public void setServoPosition(int channel,
double position,
byte speed)
public double getServoPosition(int channel)
ServoControllergetServoPosition in interface ServoControllerchannel - channel of servopublic HardwareDevice.Manufacturer getManufacturer()
HardwareDevicegetManufacturer in interface HardwareDevicepublic java.lang.String getDeviceName()
HardwareDevicegetDeviceName in interface HardwareDevicepublic java.lang.String getConnectionInfo()
HardwareDevicegetConnectionInfo in interface HardwareDevicepublic int getVersion()
HardwareDevicegetVersion in interface HardwareDevicepublic void resetDeviceConfigurationForOpMode()
HardwareDeviceresetDeviceConfigurationForOpMode in interface HardwareDevicepublic void close()
HardwareDeviceclose in interface HardwareDevicepublic void handleReadServo(MatrixI2cTransaction transaction, byte[] buffer)