Enum Class CanandcolorProximityConfig.MultiPulse
java.lang.Object
java.lang.Enum<CanandcolorProximityConfig.MultiPulse>
com.reduxrobotics.sensors.canandcolor.CanandcolorProximityConfig.MultiPulse
- All Implemented Interfaces:
Serializable
,Comparable<CanandcolorProximityConfig.MultiPulse>
,Constable
- Enclosing class:
- CanandcolorProximityConfig
public static enum CanandcolorProximityConfig.MultiPulse
extends Enum<CanandcolorProximityConfig.MultiPulse>
Determines how many IR LED pulses get sent out during proximity reads.
More pulses detect longer distances but may saturate the sensor at closer distances.
Recommended default is 8 pulses.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
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
-
k1Pulse
Use 1 pulse. -
k2Pulse
Use 2 pulses. -
k4Pulse
Use 4 pulses. -
k8Pulse
Use 8 pulses.
-
-
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
-