public class HTIRSeekerV2 extends IRSeekerV2 implements Sensor
IRSeekerV2.Mode
Modifier and Type | Field and Description |
---|---|
private static String |
AC |
private static String |
DC |
private SensorPort |
irPort |
static String |
NAME |
address, noAngle
DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, GREEN, GREEN_INDEX, MAX_AD_RAW, MAX_TYPE, MIN_TYPE, MODE_ANGLESTEP, MODE_BOOLEAN, MODE_CELSIUS, MODE_FARENHEIT, MODE_PCTFULLSCALE, MODE_PERIODCOUNTER, MODE_RAW, MODE_TRANSITIONCNT, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HISPEED, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE, WHITE, YELLOW
Constructor and Description |
---|
HTIRSeekerV2(SensorPort port) |
HTIRSeekerV2(SensorPort port,
IRSeekerV2.Mode mode) |
Modifier and Type | Method and Description |
---|---|
int |
getCommonValue()
Returns the most commonly used value of the sensor as an int (most sensors can return data as ints, if they can't, return -1, 255 or throw an UnsupportedOperationExceptiopn)
|
String |
getCommonValueAsString()
Returns the most commonly used value of the sensor as a string
Recommended Implementation:
return getCommonValue() + ""; |
List<String> |
getModes() |
String |
getName() |
SensorPort |
getPort() |
void |
setNewMode(int mode)
Sets the mode of the sensor
can be specific depending on the type of sensor (ie.
|
getAngle, getAngle, getAverage, getDirection, getSensorValue, getSensorValues, hasDirection, setMode, toString
fetchString, getAddress, getData, getData, getData, getId, getProductID, getVendorID, getVersion, sendData, sendData, sendData, setAddress
public static final String NAME
private static final String AC
private static final String DC
private SensorPort irPort
public HTIRSeekerV2(SensorPort port, IRSeekerV2.Mode mode)
public HTIRSeekerV2(SensorPort port)
public String getCommonValueAsString()
Sensor
return getCommonValue() + "";
getCommonValueAsString
in interface Sensor
public int getCommonValue()
Sensor
getCommonValue
in interface Sensor
public void setNewMode(int mode)
Sensor
setNewMode
in interface Sensor
public SensorPort getPort()