Class CompoundSubsystem

java.lang.Object
com.cdarobotics.cdalib.subsystems.Subsystem
com.cdarobotics.cdalib.subsystems.CompoundSubsystem

public abstract class CompoundSubsystem extends Subsystem
A Subsystem that groups several child subsystems and fans each lifecycle call (init/start/update/stop) out to all of them. Register children with registerSubsystem(Subsystem).
  • Constructor Details

  • Method Details

    • registerSubsystem

      public void registerSubsystem(Subsystem subsystem)
      Adds a child subsystem that will receive all lifecycle calls.
    • init

      public void init()
      Description copied from class: Subsystem
      Called once when the OpMode initializes. Grab hardware and set starting state here.
      Specified by:
      init in class Subsystem
    • start

      public void start()
      Description copied from class: Subsystem
      Called once when the OpMode starts (play pressed).
      Specified by:
      start in class Subsystem
    • update

      public void update()
      Description copied from class: Subsystem
      Called every loop. Read inputs and drive the mechanism here.
      Specified by:
      update in class Subsystem
    • stop

      public void stop()
      Description copied from class: Subsystem
      Called once when the OpMode ends. Safe or release the mechanism here.
      Specified by:
      stop in class Subsystem