Class Mechanism
java.lang.Object
me.autobot.lib.systems.mechanisms.Mechanism
- Direct Known Subclasses:
LIDAR
A mechanism that can be used on the robot.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable()Disables the mechanism.voidenable()Enables the mechanism.protected voidinit()Initializes the mechanism.static voidRuns the init method on all mechanisms.booleanGets if the mechanism is disabled.protected voidstop()Stops the mechanism.static voidstop_all()Runs the stop method on all mechanisms.protected voidupdate()Updates the mechanism.static voidRuns the update method on all mechanisms.
-
Field Details
-
disabled
protected boolean disabledIf the mechanism is disabled. -
parent
The parent robot (of the mechanism, where the mechanism is attached to).
-
-
Constructor Details
-
Mechanism
public Mechanism()Creates a new Mechanism.
-
-
Method Details
-
init_all
Runs the init method on all mechanisms.- Parameters:
robotRef- The robot reference.
-
update_all
public static void update_all()Runs the update method on all mechanisms. -
stop_all
public static void stop_all()Runs the stop method on all mechanisms. -
init
protected void init()Initializes the mechanism. -
update
protected void update()Updates the mechanism. -
stop
protected void stop()Stops the mechanism. -
disable
public void disable()Disables the mechanism. -
enable
public void enable()Enables the mechanism. -
isDisabled
public boolean isDisabled()Gets if the mechanism is disabled.- Returns:
- If the mechanism is disabled.
-