public class LynxAnalogInputController extends LynxController implements AnalogInputController
LynxController.PretendLynxModule
HardwareDevice.Manufacturer
HardwareDeviceHealth.HealthStatus
RobotArmingStateNotifier.ARMINGSTATE, RobotArmingStateNotifier.Callback
Modifier and Type | Field and Description |
---|---|
static int |
apiPortFirst |
static int |
apiPortLast |
static java.lang.String |
TAG |
context, hardwareDeviceHealth, isEngaged, isHardwareInitialized, isHooked, registeredCallbacks
tag
Constructor and Description |
---|
LynxAnalogInputController(Context context,
LynxModule module) |
Modifier and Type | Method and Description |
---|---|
double |
getAnalogInputVoltage(int port)
Get the value of this analog input
Return the current ADC results from the A0-A7 channel input pins.
|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
double |
getMaxAnalogInputVoltage()
Returns the maximum value that getAnalogInputVoltage() is capable of reading
|
SerialNumber |
getSerialNumber()
Returns the serial number of this USB module
|
protected java.lang.String |
getTag() |
adjustHookingToMatchEngagement, close, disengage, doHook, doUnhook, engage, finishConstruction, floatHardware, forgetLastKnown, getArmingState, getConnectionInfo, getHealthStatus, getHealthStatusOverride, getManufacturer, getModule, getVersion, hook, initializeHardware, isArmed, isEngaged, moduleNowArmedOrPretending, moduleNowDisarmed, onModuleStateChange, registerCallback, resetDeviceConfigurationForOpMode, setHealthStatus, setHealthyIfArmed, unhook, unregisterCallback
handleException, handleSpecificException, handleSpecificException, handleSpecificException, handleSpecificException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getConnectionInfo, getManufacturer, getVersion, resetDeviceConfigurationForOpMode
public static final java.lang.String TAG
public static final int apiPortFirst
public static final int apiPortLast
public LynxAnalogInputController(Context context, LynxModule module) throws RobotCoreException, java.lang.InterruptedException
RobotCoreException
java.lang.InterruptedException
protected java.lang.String getTag()
getTag
in class LynxController
public java.lang.String getDeviceName()
HardwareDevice
getDeviceName
in interface HardwareDevice
getDeviceName
in class LynxController
public SerialNumber getSerialNumber()
RobotArmingStateNotifier
getSerialNumber
in interface AnalogInputController
getSerialNumber
in interface RobotArmingStateNotifier
getSerialNumber
in class LynxController
public double getAnalogInputVoltage(int port)
AnalogInputController
getAnalogInputVoltage
in interface AnalogInputController
port
- which analog channel to readpublic double getMaxAnalogInputVoltage()
AnalogInputController
getMaxAnalogInputVoltage
in interface AnalogInputController
AnalogInputController.getAnalogInputVoltage(int)