Enum Class CanandcolorProximityConfig.SamplingPeriod
java.lang.Object
java.lang.Enum<CanandcolorProximityConfig.SamplingPeriod>
com.reduxrobotics.sensors.canandcolor.CanandcolorProximityConfig.SamplingPeriod
- All Implemented Interfaces:
Serializable
,Comparable<CanandcolorProximityConfig.SamplingPeriod>
,Constable
- Enclosing class:
- CanandcolorProximityConfig
public static enum CanandcolorProximityConfig.SamplingPeriod
extends Enum<CanandcolorProximityConfig.SamplingPeriod>
Represents the valid sampling periods for the proximity sensor.
Sampling periods don't actually affect sensor operation at all beyond how often data gets
updated. Generally recommended to leave at the default of 10 ms.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromIndex
(int v) Fetches the enum associated with the index value.int
getIndex()
Fetches the index associated with the enum.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
k10ms
Sample the proximity sensor every 10 ms. -
k20ms
Sample the proximity sensor every 20 ms. -
k40ms
Sample the proximity sensor every 40 ms. -
k80ms
Sample the proximity sensor every 80 ms.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getIndex
public int getIndex()Fetches the index associated with the enum.- Returns:
- index value
-
fromIndex
Fetches the enum associated with the index value.- Parameters:
v
- int containing index value; only lower 2 bits are used- Returns:
- corresponding enum
-