Package edu.wpi.first.wpilibj
Class DSControlWord
java.lang.Object
edu.wpi.first.wpilibj.DSControlWord
public class DSControlWord extends Object
A wrapper around Driver Station control word.
-
Constructor Summary
Constructors Constructor Description DSControlWord()
DSControlWord constructor. -
Method Summary
Modifier and Type Method Description boolean
isAutonomous()
Gets a value indicating whether the Driver Station requires the robot to be running in autonomous mode.boolean
isAutonomousEnabled()
Gets a value indicating whether the Driver Station requires the robot to be running in autonomous mode and enabled.boolean
isDisabled()
Gets a value indicating whether the Driver Station requires the robot to be disabled.boolean
isDSAttached()
Gets a value indicating whether the Driver Station is attached.boolean
isEnabled()
Gets a value indicating whether the Driver Station requires the robot to be enabled.boolean
isEStopped()
Gets a value indicating whether the Robot is e-stopped.boolean
isFMSAttached()
Gets if the driver station attached to a Field Management System.boolean
isTeleop()
Gets a value indicating whether the Driver Station requires the robot to be running in operator-controlled mode.boolean
isTeleopEnabled()
Gets a value indicating whether the Driver Station requires the robot to be running in operator-controller mode and enabled.boolean
isTest()
Gets a value indicating whether the Driver Station requires the robot to be running in test mode.void
refresh()
Update internal Driver Station control word.
-
Constructor Details
-
DSControlWord
public DSControlWord()DSControlWord constructor.Upon construction, the current Driver Station control word is read and stored internally.
-
-
Method Details
-
refresh
Update internal Driver Station control word. -
isEnabled
Gets a value indicating whether the Driver Station requires the robot to be enabled.- Returns:
- True if the robot is enabled, false otherwise.
-
isDisabled
Gets a value indicating whether the Driver Station requires the robot to be disabled.- Returns:
- True if the robot should be disabled, false otherwise.
-
isEStopped
Gets a value indicating whether the Robot is e-stopped.- Returns:
- True if the robot is e-stopped, false otherwise.
-
isAutonomous
Gets a value indicating whether the Driver Station requires the robot to be running in autonomous mode.- Returns:
- True if autonomous mode should be enabled, false otherwise.
-
isAutonomousEnabled
Gets a value indicating whether the Driver Station requires the robot to be running in autonomous mode and enabled.- Returns:
- True if autonomous should be set and the robot should be enabled.
-
isTeleop
Gets a value indicating whether the Driver Station requires the robot to be running in operator-controlled mode.- Returns:
- True if operator-controlled mode should be enabled, false otherwise.
-
isTeleopEnabled
Gets a value indicating whether the Driver Station requires the robot to be running in operator-controller mode and enabled.- Returns:
- True if operator-controlled mode should be set and the robot should be enabled.
-
isTest
Gets a value indicating whether the Driver Station requires the robot to be running in test mode.- Returns:
- True if test mode should be enabled, false otherwise.
-
isDSAttached
Gets a value indicating whether the Driver Station is attached.- Returns:
- True if Driver Station is attached, false otherwise.
-
isFMSAttached
Gets if the driver station attached to a Field Management System.- Returns:
- true if the robot is competing on a field being controlled by a Field Management System
-