Package behaviors
Class BatteryLevel
java.lang.Object
behaviors.BatteryLevel
- All Implemented Interfaces:
lejos.robotics.subsumption.Behavior
Checks whether the battery level is low, if it is exits the program.
- Since:
- 2023
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
BatteryLevel
public BatteryLevel()Null battery level constructor
-
-
Method Details
-
action
public void action()Action displays on the screen that the battery is low waits and then exits the program.- 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 battery level is below 7 volts.- Specified by:
takeControl
in interfacelejos.robotics.subsumption.Behavior
- Returns:
- boolean
-