Class XDutyCycleEncoder

java.lang.Object
xbot.common.controls.sensors.XDutyCycleEncoder
All Implemented Interfaces:
DataFrameRefreshable, XBaseIO
Direct Known Subclasses:
DutyCycleEncoderWpiAdapter, MockDutyCycleEncoder

public abstract class XDutyCycleEncoder extends Object implements XBaseIO, DataFrameRefreshable
  • Field Details

    • channel

      protected int channel
    • inverted

      protected boolean inverted
  • Constructor Details

  • Method Details

    • getAbsolutePosition

      public org.wpilib.units.measure.Angle getAbsolutePosition()
      Returns:
      the number of rotations the encoder has gone through since it was last reset.
    • getWrappedPosition

      public org.wpilib.units.measure.Angle getWrappedPosition()
      Returns:
      the position of the encoder wrapped to the range [-180, 180) degrees (or equivalent units).
    • getChannel

      public int getChannel()
      Specified by:
      getChannel in interface XBaseIO
    • setInverted

      public void setInverted(boolean inverted)
    • inversionFactor

      protected double inversionFactor()
    • updateInputs

      public abstract void updateInputs(XDutyCycleEncoderInputs 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