Class CompoundSubsystem
java.lang.Object
com.cdarobotics.cdalib.subsystems.Subsystem
com.cdarobotics.cdalib.subsystems.CompoundSubsystem
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 Summary
ConstructorsConstructorDescriptionCreates an empty compound subsystem; add children withregisterSubsystem(Subsystem). -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Called once when the OpMode initializes.voidregisterSubsystem(Subsystem subsystem) Adds a child subsystem that will receive all lifecycle calls.voidstart()Called once when the OpMode starts (play pressed).voidstop()Called once when the OpMode ends.voidupdate()Called every loop.
-
Constructor Details
-
CompoundSubsystem
public CompoundSubsystem()Creates an empty compound subsystem; add children withregisterSubsystem(Subsystem).
-
-
Method Details
-
registerSubsystem
Adds a child subsystem that will receive all lifecycle calls. -
init
public void init()Description copied from class:SubsystemCalled once when the OpMode initializes. Grab hardware and set starting state here. -
start
public void start()Description copied from class:SubsystemCalled once when the OpMode starts (play pressed). -
update
public void update()Description copied from class:SubsystemCalled every loop. Read inputs and drive the mechanism here. -
stop
public void stop()Description copied from class:SubsystemCalled once when the OpMode ends. Safe or release the mechanism here.
-