-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Code for Creating a Questionarie | ||
Import the Library | ||
``` java | ||
import shuffleboardlib.Question; | ||
import shuffleboardlib.Questionnaire; | ||
|
||
public class DriverStation extends ShuffleboardTabBase{ | ||
private Questionnaire questionnaire; | ||
|
||
public DriverStation(){ | ||
//create a hashmap to store the options if the robot is in the left position | ||
HashMap<String, Question> leftPieceNumber = new HashMap<>(); | ||
//add items to the hashmap, the first arguement is the answer, the next is a question | ||
//the question arguements are the question, a Hashmap<String, Question> for the answers, a boolean for if it is the last question on that path of the tree, and if it is the output for the questionaire | ||
leftPieceNumber.put("1", new Question("1 piece", null, true, "LeftOne")); | ||
leftPieceNumber.put("2", new Question("2 piece", null, true, "LeftTwo")); | ||
Question leftPieceNumberQuestion = new Question("How many pieces?", leftPieceNumber, false, null); | ||
|
||
//create a hashmap for the answers to the root question | ||
HashMap<String, Question> answersHashMap = new HashMap<>(); | ||
answersHashMap.put("left", leftPieceNumberQuestion); | ||
answersHashMap.put("middle", new Question ("middle", null, true, "midCone")); | ||
|
||
Question rootQuestion = new Question("starting position", answersHashMap, false, null); | ||
|
||
questionnaire = new Questionnaire("Driver Station", rootQuestion, 5); | ||
|
||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
./gradlew build | ||
|
||
mv lib/build/libs/lib.jar ../2023Robot/libs/ShuffleboardLib.jar | ||
#mv lib/build/libs/lib.jar ../SwerveDrive/libs/ShuffleboardLib.jar | ||
#Replace SwerveDrive with the name of project you would like to build to | ||
#project must be in the same directory as ShuffleboardLib | ||
mv lib/build/libs/lib.jar ../SwerveDrive/libs/ShuffleboardLib.jar | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters