Package behaviors

Class EmergencyStop

java.lang.Object
behaviors.EmergencyStop
All Implemented Interfaces:
lejos.robotics.subsumption.Behavior

public class EmergencyStop extends Object implements lejos.robotics.subsumption.Behavior
When a button is pressed causes the robot to emergency stop and exit the program.
Since:
2023
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor for EmergencyStop behavior.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 function does nothing here.
    boolean
    Take control returns true when the down button is being pressed down.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface lejos.robotics.subsumption.Behavior
    • suppress

      public void suppress()
      Suppress function does nothing here.
      Specified by:
      suppress in interface lejos.robotics.subsumption.Behavior
    • takeControl

      public boolean takeControl()
      Take control returns true when the down button is being pressed down.
      Specified by:
      takeControl in interface lejos.robotics.subsumption.Behavior
      Returns:
      boolean