Class XCANCoder

java.lang.Object
xbot.common.controls.sensors.XAbsoluteEncoder
xbot.common.controls.sensors.XCANCoder
All Implemented Interfaces:
DataFrameRefreshable
Direct Known Subclasses:
CANCoderAdapter, MockCANCoder

public abstract class XCANCoder extends XAbsoluteEncoder
  • Constructor Details

  • Method Details

    • setUpdateFrequencyForPosition

      public abstract StatusCode setUpdateFrequencyForPosition(double frequencyInHz)
      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

      public abstract StatusCode 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

      public abstract StatusCode clearStickyFaults()
    • hasResetOccurred

      public boolean hasResetOccurred()
    • updateInputs

      public abstract void updateInputs(XCANCoderInputs inputs)
    • refreshDataFrame

      public void refreshDataFrame()
      Description copied from interface: DataFrameRefreshable
      Consumes and processes inputs from the device or subsystem.
      Specified by:
      refreshDataFrame in interface DataFrameRefreshable
      Overrides:
      refreshDataFrame in class XAbsoluteEncoder