public final class ControlWord
extends java.lang.Object
Constructor and Description |
---|
ControlWord(RobotControlState controlState,
boolean emergencyStopped,
boolean fmsAttached,
boolean dsAttached)
Creates a new ControlWord object.
|
Modifier and Type | Method and Description |
---|---|
static ControlWord |
fromBits(int word)
Creates a new ControlWord object from a control word bitfield.
|
RobotControlState |
getControlState()
Gets the control state of the robot.
|
boolean |
isDsAttached()
Checks if the robot has a connection to the FRC DriverStation.
|
boolean |
isEmergencyStopped()
Checks if the robot is E-stopped.
|
boolean |
isFmsAttached()
Checks if the robot has a connection to the FMS.
|
int |
toBits()
Converts this ControlWord to bits that WPILib can understand.
|
public ControlWord(RobotControlState controlState, boolean emergencyStopped, boolean fmsAttached, boolean dsAttached)
controlState
- the state of the robotemergencyStopped
- if the robot is E-stoppedfmsAttached
- if the robot has a connection to the FMSdsAttached
- if the robot has a connection to the FRC DriverStationpublic static ControlWord fromBits(int word)
word
- the control word bitfieldpublic int toBits()
public RobotControlState getControlState()
public boolean isEmergencyStopped()
public boolean isFmsAttached()
public boolean isDsAttached()