Class CompressorSubsystem

All Implemented Interfaces:
Sendable, Subsystem, DataFrameRefreshable, IPropertySupport

@Singleton public class CompressorSubsystem extends BaseSubsystem
Subsystem for managing compressor state.
  • Field Details

  • Constructor Details

    • CompressorSubsystem

      @Inject public CompressorSubsystem(XCompressor.XCompressorFactory compressorFactory, PropertyFactory pf)
      Create a new CompressorSubsystem.
      Parameters:
      compressorFactory - The compressor factory.
      pf - The property factory.
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Gets whether the compressor is enabled.
      Returns:
      True if enabled, false if not.
    • enable

      public void enable()
      Enable the compressor.
    • disable

      public void disable()
      Disable the compressor.
    • getCompressorCurrent

      public double getCompressorCurrent()
      Gets the current consumed by the compressor.
      Returns:
      The current in amps.
    • getEnableCommand

      public final Command getEnableCommand()
      Gets a command to enable the compressor.
      Returns:
      The command.
    • getDisableCommand

      public final Command getDisableCommand()
      Gets a command to disable the compressor.
      Returns:
      The command.
    • periodic

      public void periodic()
      Description copied from class: BaseSubsystem
      This method is called on each CommandScheduler loop.
      Specified by:
      periodic in interface Subsystem
      Overrides:
      periodic in class BaseSubsystem