public static class AMSColorSensor.Parameters
extends java.lang.Object
implements java.lang.Cloneable
AMSColorSensor.initialize(Parameters)
Modifier and Type | Field and Description |
---|---|
int |
atime
the integration time to use for color sensing
|
int |
deviceId
the device id expected to be reported by the color sensor chip
|
AMSColorSensor.Gain |
gain
the gain level to use for color sensing
|
I2cAddr |
i2cAddr
the address at which the sensor resides on the I2C bus.
|
AMSColorSensor.LEDDrive |
ledDrive
when using proximity, controls the nominal proximity LED drive current
|
boolean |
loggingEnabled
debugging aid: enable logging for this device?
|
java.lang.String |
loggingTag
debugging aid: the logging tag to use when logging
|
int |
proximityPulseCount
when using the proximity functionality, controls the number of times
the proximity LED is pulsed each cycle.
|
int |
proximitySaturation
the maximum possible raw proximity value read.
|
I2cDeviceSynch.ReadWindow |
readWindow
set of registers to read in background, if supported by underlying I2cDeviceSynch
|
boolean |
useProximityIfAvailable
whether we should turn on the proximity functionality if it
is available on the chip in question
|
Constructor and Description |
---|
Parameters(I2cAddr i2cAddr,
int deviceId) |
Modifier and Type | Method and Description |
---|---|
static int |
atimeFromMs(float msAccumulationInterval)
Returns the minimum integration register value ('atime') for which the accumulation
interval is at least the indicated duration in length.
|
AMSColorSensor.Parameters |
clone() |
static AMSColorSensor.Parameters |
createForTCS34725() |
static AMSColorSensor.Parameters |
createForTMD37821() |
int |
getMaximumReading()
Returns the maximum intensity count that can be reached in the currently configured
accumulation time interval
|
int |
integrationCycles()
Returns the number of 2.4ms integration cycles currently configured for each
accumulation time interval
|
float |
msAccumulationInterval()
Returns the duration of the accumulation interval
|
public int deviceId
public I2cAddr i2cAddr
public AMSColorSensor.Gain gain
public int atime
public boolean useProximityIfAvailable
public int proximityPulseCount
public AMSColorSensor.LEDDrive ledDrive
public int proximitySaturation
public boolean loggingEnabled
public java.lang.String loggingTag
public I2cDeviceSynch.ReadWindow readWindow
public Parameters(I2cAddr i2cAddr, int deviceId)
public static int atimeFromMs(float msAccumulationInterval)
public int integrationCycles()
public int getMaximumReading()
public float msAccumulationInterval()
public static AMSColorSensor.Parameters createForTCS34725()
public static AMSColorSensor.Parameters createForTMD37821()
public AMSColorSensor.Parameters clone()
clone
in class java.lang.Object