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 TypeMethodDescriptionvoid
disable()
Disables the mechanism.void
enable()
Enables the mechanism.protected void
init()
Initializes the mechanism.static void
Runs the init method on all mechanisms.boolean
Gets if the mechanism is disabled.protected void
stop()
Stops the mechanism.static void
stop_all()
Runs the stop method on all mechanisms.protected void
update()
Updates the mechanism.static void
Runs 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.
-