Class CompressorSubsystem

java.lang.Object
org.wpilib.command2.SubsystemBase
xbot.common.command.BaseSubsystem
xbot.common.subsystems.compressor.CompressorSubsystem
All Implemented Interfaces:
org.wpilib.command2.Subsystem, org.wpilib.telemetry.TelemetryLoggable, TunablePrefixProvider

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

  • Constructor Details

    • CompressorSubsystem

      @Inject public CompressorSubsystem(XCompressor.XCompressorFactory compressorFactory, TunableFactory tunableFactory)
      Create a new CompressorSubsystem.
      Parameters:
      compressorFactory - The compressor factory.
      tunableFactory - The tunable 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 org.wpilib.command2.Command getEnableCommand()
      Gets a command to enable the compressor.
      Returns:
      The command.
    • getDisableCommand

      public final org.wpilib.command2.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 org.wpilib.command2.Subsystem
      Overrides:
      periodic in class BaseSubsystem