Class AnalogInputDevice
java.lang.Object
com.cdarobotics.cdalib.devices.Device
com.cdarobotics.cdalib.devices.sensors.AnalogInputDevice
-
Constructor Summary
ConstructorsConstructorDescriptionAnalogInputDevice(com.qualcomm.robotcore.hardware.AnalogInput input) Wraps an already-resolved analog input.AnalogInputDevice(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String name) Resolves the analog input from the hardware map by configured name. -
Method Summary
-
Constructor Details
-
AnalogInputDevice
public AnalogInputDevice(com.qualcomm.robotcore.hardware.AnalogInput input) Wraps an already-resolved analog input. -
AnalogInputDevice
Resolves the analog input from the hardware map by configured name.
-
-
Method Details
-
getVoltage
public double getVoltage()- Returns:
- the input voltage as of the last
update().
-
getMaxVoltage
public double getMaxVoltage()- Returns:
- the maximum voltage this input can report (a fixed hardware constant).
-
getInput
public com.qualcomm.robotcore.hardware.AnalogInput getInput()- Returns:
- the wrapped SDK input, for operations not exposed here.
-
update
public void update()Description copied from class:DeviceFlush pending writes to, or refresh cached reads from, the underlying hardware.
-