@DigitalIoDeviceType @DeviceProperties(name="@string/configTypeRevTouchSensor", xmlTag="RevTouchSensor", builtIn=true, compatibleControlSystems=REV_HUB, description="@string/rev_touch_sensor_description") public class RevTouchSensor extends java.lang.Object implements TouchSensor
HardwareDevice.Manufacturer| Constructor and Description |
|---|
RevTouchSensor(DigitalChannelController digitalChannelController,
int physicalPort) |
| 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.
|
double |
getValue()
Represents how much force is applied to the touch sensor; for some touch sensors
this value will only ever be 0 or 1.
|
int |
getVersion()
Version
|
boolean |
isPressed()
Return true if the touch sensor is being pressed
|
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
public RevTouchSensor(DigitalChannelController digitalChannelController, int physicalPort)
public double getValue()
TouchSensorgetValue in interface TouchSensorpublic boolean isPressed()
TouchSensorisPressed in interface TouchSensorpublic 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 HardwareDevice