Package frclib.driverio
Class FrcUserChoices
java.lang.Object
frclib.driverio.FrcUserChoices
This class implements the FrcUserChoices object in which you can add named fields to the smart dashboard allowing
the drive team to select various choices for the match. The choices could be related to autonomous, subsystem
options, auto-assist or anything you want to alter how the robot program is run.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBoolean
(String key, boolean value) This method adds a boolean field to the smart dashboard.void
addChoiceMenu
(String key, FrcChoiceMenu<?> choiceMenu) This method adds a choice menu to the dmart dashboard.void
This method adds a number field to the smart dashboard.void
This method adds a string field to the smart dashboard.boolean
getUserBoolean
(String key) This method retrieves the current boolean associated with the boolean field with the given name.getUserChoice
(String key) This method retrieves the current user choice object associated with the choice menu with the given name.double
getUserNumber
(String key) This method retrieves the current number associated with the number field with the given name.getUserString
(String key) This method retrieves the current string associated with the string field with the given name.
-
Constructor Details
-
FrcUserChoices
public FrcUserChoices()Constructor: Create an instance of the object.
-
-
Method Details
-
addChoiceMenu
This method adds a choice menu to the dmart dashboard. This allows the drive team to pick options such as autonomous strategies, or starting position.- Parameters:
key
- specifies the dashboard key associated with the choice menu. This also determines which tab the choice menu will be placed on the smart dashboard.choiceMenu
- specifies the choice menu to be added.
-
addString
This method adds a string field to the smart dashboard.- Parameters:
key
- specifies the dashboard key associated with the string field. This also determines which tab the string field will be placed on the smart dashboard.value
- specifies the initial string value.
-
addNumber
This method adds a number field to the smart dashboard.- Parameters:
key
- specifies the dashboard key associated with the number field. This also determines which tab the number field will be placed on the smart dashboard.value
- specifies the initial number value.
-
addBoolean
This method adds a boolean field to the smart dashboard.- Parameters:
key
- specifies the dashboard key associated with the boolean field. This also determines which tab the boolean will be placed on the smart dashboard.value
- specifies the initial boolean value.
-
getUserChoice
This method retrieves the current user choice object associated with the choice menu with the given name.- Parameters:
key
- specifies the dashboard key associated with the choice menu.- Returns:
- current choice object from the assoicated choice menu.
-
getUserString
This method retrieves the current string associated with the string field with the given name.- Parameters:
key
- specifies the dashboard key associated with the string field.- Returns:
- current string value from the assoicated string field.
-
getUserNumber
This method retrieves the current number associated with the number field with the given name.- Parameters:
key
- specifies the dashboard key associated with the number field.- Returns:
- current number value from the assoicated number field.
-
getUserBoolean
This method retrieves the current boolean associated with the boolean field with the given name.- Parameters:
key
- specifies the dashboard key associated with the boolean field.- Returns:
- current boolean value from the assoicated boolean field.
-