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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaction()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.voidsuppress()Suppress function does nothing here.booleanTake 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:
actionin interfacelejos.robotics.subsumption.Behavior
-
suppress
public void suppress()Suppress function does nothing here.- Specified by:
suppressin interfacelejos.robotics.subsumption.Behavior
-
takeControl
public boolean takeControl()Take control returns true when the down button is being pressed down.- Specified by:
takeControlin interfacelejos.robotics.subsumption.Behavior- Returns:
- boolean
-