public final class HiTechnicNxtServoController extends HiTechnicNxtController implements ServoController
ServoController.PwmStatusHardwareDevice.Manufacturer| Modifier and Type | Field and Description |
|---|---|
protected static byte[] |
ADDRESS_CHANNEL_MAP |
protected static int |
ADDRESS_PWM |
protected static double |
apiPositionMax |
protected static double |
apiPositionMin |
protected LastKnown<java.lang.Double>[] |
commandedServoPositions |
protected static I2cAddr |
I2C_ADDRESS |
protected static int |
iRegWindowFirst |
protected static int |
iRegWindowMax |
protected LastKnown<java.lang.Boolean> |
lastKnownPwmEnabled |
protected static byte |
PWM_DISABLE |
protected static byte |
PWM_ENABLE |
protected static byte |
PWM_ENABLE_WITHOUT_TIMEOUT |
protected static int |
SERVO_FIRST |
protected static int |
SERVO_LAST |
protected static double |
servoPositionMax |
protected static double |
servoPositionMin |
context, i2cDevice, i2cDeviceSynch, isEngaged, isHardwareInitialized, isHookedcontroller, physicalPort| Constructor and Description |
|---|
HiTechnicNxtServoController(Context context,
I2cController module,
int physicalPort) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
controllerNowArmedOrPretending()
intended as a subclass hook
|
protected void |
doHook() |
protected void |
doUnhook() |
protected void |
floatHardware() |
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 servo)
Get the position of a servo at a given channel
|
int |
getVersion()
Version
|
void |
initializeHardware() |
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 servo,
double position)
Set the position of a servo at the given channel
|
adjustHookingToMatchEngagement, close, controllerNowDisarmed, disengage, engage, hook, isArmed, isEngaged, read8, unhook, write, write8finishConstruction, getI2cController, getPort, onModuleStateChangeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseprotected static final I2cAddr I2C_ADDRESS
protected static final int SERVO_FIRST
protected static final int SERVO_LAST
protected static final byte PWM_ENABLE
protected static final byte PWM_ENABLE_WITHOUT_TIMEOUT
protected static final byte PWM_DISABLE
protected static final byte[] ADDRESS_CHANNEL_MAP
protected static final int ADDRESS_PWM
protected static final int iRegWindowFirst
protected static final int iRegWindowMax
protected static final double apiPositionMin
protected static final double apiPositionMax
protected static final double servoPositionMin
protected static final double servoPositionMax
protected LastKnown<java.lang.Double>[] commandedServoPositions
protected LastKnown<java.lang.Boolean> lastKnownPwmEnabled
public HiTechnicNxtServoController(Context context,
I2cController module,
int physicalPort)
protected void controllerNowArmedOrPretending()
I2cControllerPortDeviceImplcontrollerNowArmedOrPretending in class I2cControllerPortDeviceImplprotected void doHook()
doHook in class HiTechnicNxtControllerpublic void initializeHardware()
initializeHardware in class HiTechnicNxtControllerprotected void doUnhook()
doUnhook in class HiTechnicNxtControllerpublic HardwareDevice.Manufacturer getManufacturer()
HardwareDevicegetManufacturer in interface HardwareDevicegetManufacturer in class HiTechnicNxtControllerpublic java.lang.String getDeviceName()
HardwareDevicegetDeviceName in interface HardwareDevicepublic java.lang.String getConnectionInfo()
HardwareDevicegetConnectionInfo in interface HardwareDevicepublic void resetDeviceConfigurationForOpMode()
HardwareDeviceresetDeviceConfigurationForOpMode in interface HardwareDevicepublic int getVersion()
HardwareDevicegetVersion in interface HardwareDevicepublic void pwmEnable()
ServoControllerpwmEnable in interface ServoControllerpublic void pwmDisable()
ServoControllerpwmDisable in interface ServoControllerpublic ServoController.PwmStatus getPwmStatus()
ServoControllergetPwmStatus in interface ServoControllerpublic void setServoPosition(int servo,
double position)
ServoControllersetServoPosition in interface ServoControllerservo - channel of servoposition - from 0.0 to 1.0public double getServoPosition(int servo)
ServoControllergetServoPosition in interface ServoControllerservo - channel of servoprotected void floatHardware()
floatHardware in class HiTechnicNxtController