Package xbot.common.controls.sensors
Class XCANCoder
java.lang.Object
xbot.common.controls.sensors.XAbsoluteEncoder
xbot.common.controls.sensors.XCANCoder
- All Implemented Interfaces:
DataFrameRefreshable
- Direct Known Subclasses:
CANCoderAdapter
,MockCANCoder
-
Nested Class Summary
Nested classes/interfaces inherited from class xbot.common.controls.sensors.XAbsoluteEncoder
XAbsoluteEncoder.XAbsoluteEncoderFactory
-
Field Summary
Fields inherited from class xbot.common.controls.sensors.XAbsoluteEncoder
info
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract StatusCode
boolean
void
Consumes and processes inputs from the device or subsystem.abstract StatusCode
setUpdateFrequencyForPosition
(double frequencyInHz) Updates how often we get data about the CANCoder position.abstract StatusCode
Stops all signals that are not explicitly set.abstract void
updateInputs
(XCANCoderInputs inputs) Methods inherited from class xbot.common.controls.sensors.XAbsoluteEncoder
getAbsolutePosition, getDeviceId, getHealth, getPosition, getVelocity, setPosition, updateInputs
-
Constructor Details
-
XCANCoder
-
-
Method Details
-
setUpdateFrequencyForPosition
Updates how often we get data about the CANCoder position.- Parameters:
frequencyInHz
- How many times per second we want to get data.- Returns:
- The status code returned from the underlying object.
-
stopAllUnsetSignals
Stops all signals that are not explicitly set. For example, if you haven't called setUpdateFrequencyForPosition, this will stop that signal! Useful for reducing CAN bus traffic for data we're not reading.- Returns:
- The status code returned from the underlying object.
-
clearStickyFaults
-
hasResetOccurred
public boolean hasResetOccurred() -
updateInputs
-
refreshDataFrame
public void refreshDataFrame()Description copied from interface:DataFrameRefreshable
Consumes and processes inputs from the device or subsystem.- Specified by:
refreshDataFrame
in interfaceDataFrameRefreshable
- Overrides:
refreshDataFrame
in classXAbsoluteEncoder
-