Package behaviors
Class EmergencyStop
java.lang.Object
behaviors.EmergencyStop
- All Implemented Interfaces:
lejos.robotics.subsumption.Behavior
When a button is pressed causes the robot to emergency stop and exit the program.
- Since:
- 2023
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
action()
Sets the state for exit and sends a packet to the client if its connected saying it is exiting.The exit state does not return true any behavior resulting in it terminating the arbitrator.void
suppress()
Suppress function does nothing here.boolean
Take control returns true when the down button is being pressed down.
-
Constructor Details
-
EmergencyStop
public EmergencyStop()Empty constructor for EmergencyStop behavior.
-
-
Method Details
-
action
public void action()Sets the state for exit and sends a packet to the client if its connected saying it is exiting.The exit state does not return true any behavior resulting in it terminating the arbitrator.- Specified by:
action
in interfacelejos.robotics.subsumption.Behavior
-
suppress
public void suppress()Suppress function does nothing here.- Specified by:
suppress
in interfacelejos.robotics.subsumption.Behavior
-
takeControl
public boolean takeControl()Take control returns true when the down button is being pressed down.- Specified by:
takeControl
in interfacelejos.robotics.subsumption.Behavior
- Returns:
- boolean
-