From b791fb703a24bd4382bfbd6b1b6e3ca9e2280156 Mon Sep 17 00:00:00 2001 From: spencerng Date: Mon, 4 Mar 2019 18:25:48 -0500 Subject: [PATCH] Begin match prediction overlay --- .../team25/scouting/client/ui/Controller.java | 243 ---------- .../frc/team25/scouting/client/ui/Main.java | 2 +- .../scouting/client/ui/MainController.java | 312 ++++++++++++ .../client/ui/MatchPredictionController.java | 15 + .../team25/scouting/data/AllianceReport.java | 4 + .../frc/team25/scouting/data/EventReport.java | 32 +- .../frc/team25/scouting/data/FileManager.java | 2 +- .../frc/team25/scouting/data/TeamReport.java | 2 +- src/main/resources/fxml/main.fxml | 43 +- .../resources/fxml/match_predictions.fxml | 448 ++++++++++++++++++ 10 files changed, 845 insertions(+), 258 deletions(-) delete mode 100644 src/main/java/org/usfirst/frc/team25/scouting/client/ui/Controller.java create mode 100644 src/main/java/org/usfirst/frc/team25/scouting/client/ui/MainController.java create mode 100644 src/main/java/org/usfirst/frc/team25/scouting/client/ui/MatchPredictionController.java create mode 100644 src/main/resources/fxml/match_predictions.fxml diff --git a/src/main/java/org/usfirst/frc/team25/scouting/client/ui/Controller.java b/src/main/java/org/usfirst/frc/team25/scouting/client/ui/Controller.java deleted file mode 100644 index 1de3347..0000000 --- a/src/main/java/org/usfirst/frc/team25/scouting/client/ui/Controller.java +++ /dev/null @@ -1,243 +0,0 @@ -package org.usfirst.frc.team25.scouting.client.ui; - -import javafx.fxml.FXML; -import javafx.scene.control.*; -import javafx.scene.text.Text; -import javafx.stage.DirectoryChooser; -import org.usfirst.frc.team25.scouting.data.AllianceReport; -import org.usfirst.frc.team25.scouting.data.BlueAlliance; -import org.usfirst.frc.team25.scouting.data.EventReport; -import org.usfirst.frc.team25.scouting.data.FileManager; -import org.usfirst.frc.team25.scouting.data.models.ScoutEntry; - -import java.io.File; -import java.util.ArrayList; - -public class Controller { - - @FXML - private Button chooseDataFolderButton, generateFilesButton, downloadDataButton, displayReportButton; - @FXML - private TextArea statusTextBox; - @FXML - private Text dataDirectoryDisplay; - @FXML - private CheckBox combineJson, generatePicklists, generateCsv, fixErrors, backupJson, generatePredictions; - @FXML - private RadioButton teamBasedReport, allianceBasedReport, teamEventsDownload, eventDownload; - @FXML - private TextField analysisTeamOne, analysisTeamTwo, analysisTeamThree, teamNumEventCode; - - private EventReport eventReport; - private ArrayList jsonFileList; - private String eventName; - - private File currentDataDirectory, teamNameList; - - public void initialize() { - - addStatus("Client opened!\n\nSelect data folder"); - - ToggleGroup reportGenerationGroup = new ToggleGroup(); - teamBasedReport.setToggleGroup(reportGenerationGroup); - allianceBasedReport.setToggleGroup(reportGenerationGroup); - - ToggleGroup tbaDownloadGroup = new ToggleGroup(); - teamEventsDownload.setToggleGroup(tbaDownloadGroup); - eventDownload.setToggleGroup(tbaDownloadGroup); - - dataDirectoryDisplay.setText(""); - - chooseDataFolderButton.setOnAction(event -> { - DirectoryChooser directoryChooser = new DirectoryChooser(); - File selectedDirectory = directoryChooser.showDialog(chooseDataFolderButton.getScene().getWindow()); - - if (selectedDirectory == null) { - if (currentDataDirectory == null) { - addStatus("Invalid or no data directory selected!"); - } else { - addStatus(currentDataDirectory.getAbsolutePath() + " retained as data directory"); - } - } else { - currentDataDirectory = selectedDirectory; - addStatus(selectedDirectory.getAbsolutePath() + " selected as data directory"); - dataDirectoryDisplay.setText(selectedDirectory.getAbsolutePath()); - generateFilesButton.setDisable(false); - downloadDataButton.setDisable(false); - displayReportButton.setDisable(false); - - } - }); - - allianceBasedReport.setOnAction(event -> { - analysisTeamTwo.setDisable(!allianceBasedReport.isSelected()); - analysisTeamThree.setDisable(!allianceBasedReport.isSelected()); - }); - - teamBasedReport.setOnAction(event -> { - analysisTeamTwo.setDisable(teamBasedReport.isSelected()); - analysisTeamThree.setDisable(teamBasedReport.isSelected()); - analysisTeamTwo.setText(""); - analysisTeamThree.setText(""); - }); - - generateFilesButton.setOnAction(event -> { - - String status = ""; - - retrieveEventReport(); - - if (backupJson.isSelected()) { - FileManager.createBackup(jsonFileList, currentDataDirectory); - status += "\nBackup JSON files created"; - } - - if (fixErrors.isSelected()) { - eventReport.generateInaccuracyList(currentDataDirectory); - if (eventReport.fixInaccuraciesTBA()) { - status += "\nInaccuracies fixed and inaccuracy list generated"; - } else { - status += "\nNo inaccuracies found or Internet unavailable"; - } - } - - if (combineJson.isSelected() && eventReport.generateCombineJson(currentDataDirectory)) { - status += "\nCombined data JSON file generated"; - - if (FileManager.deleteIndividualDataFiles(currentDataDirectory)) { - status += "\nIndividual data JSON files deleted"; - } - - } - - - if (generateCsv.isSelected()) { - if (eventReport.generateRawSpreadsheet(currentDataDirectory)) { - status += "\nRaw data spreadsheet generated"; - } else { - status += "\nRaw data spreadsheet failed to generate. Are you sure the CSV file isn't open?"; - } - } - - if (generatePicklists.isSelected()) { - eventReport.generatePicklists(currentDataDirectory); - status += "\nPicklists generated"; - } - - if (generatePredictions.isSelected()) { - eventReport.generateMatchPredictions(currentDataDirectory); - status += "\nFuture match predictions generated"; - } - - - if (status.isEmpty()) { - addStatus("Please select data processing options!"); - } else { - addStatus("Data processing for event " + eventName + " successful:\n" + status); - } - - }); - - downloadDataButton.setOnAction(event -> { - String response; - if (teamNumEventCode.getText().isEmpty()) { - response = "Please enter a team number or event key."; - } else if (teamEventsDownload.isSelected()) { - try { - response = BlueAlliance.downloadTeamEvents(currentDataDirectory, - Integer.parseInt(teamNumEventCode.getText())); - } catch (NumberFormatException e) { - response = teamNumEventCode.getText() + " is not a valid team number"; - } - } else { - response = BlueAlliance.downloadEventTeamData(currentDataDirectory, teamNumEventCode.getText()); - - } - - addStatus(response); - }); - - displayReportButton.setOnAction(event -> { - - retrieveEventReport(); - - if (teamBasedReport.isSelected()) { - - int teamNum; - try { - teamNum = Integer.parseInt(analysisTeamOne.getText()); - if (!eventReport.isTeamPlaying(teamNum)) { - addStatus("Invalid team number for event " + eventName + ". Please try again."); - } else { - addStatus(eventReport.getTeamReport(teamNum).getQuickStatus()); - } - } catch (NumberFormatException e) { - addStatus("Invalid or missing team number. Please try again."); - } - - - } else { - int teamOne, teamTwo, teamThree; - - try { - teamOne = Integer.parseInt(analysisTeamOne.getText()); - teamTwo = Integer.parseInt(analysisTeamTwo.getText()); - teamThree = Integer.parseInt(analysisTeamThree.getText()); - if (!eventReport.isTeamPlaying(teamOne) || !eventReport.isTeamPlaying(teamTwo) || !eventReport.isTeamPlaying(teamThree)) { - addStatus("Invalid team number(s) for event " + eventName + ". Please try again."); - } else { - AllianceReport allianceReport = eventReport.getAllianceReport(new int[]{teamOne, teamTwo, - teamThree}); - addStatus(allianceReport.getQuickAllianceReport()); - - } - } catch (NumberFormatException e) { - addStatus("Invalid or missing team number(s). Please try again."); - - } - - } - }); - - } - - /** - * Retrieves JSON data files from the selected data directory and converts them into an EventReport for data - * processing - */ - private void retrieveEventReport() { - this.jsonFileList = FileManager.getDataFiles(currentDataDirectory); - - if (jsonFileList.size() == 0) { - addStatus("No JSON data files found in " + currentDataDirectory.getAbsolutePath() + - ".\nPlease select another directory."); - return; - } - - eventName = jsonFileList.get(0).getName().split(FileManager.FILE_EXTENSION_REGEX)[0].split(" - ")[2]; - - - ArrayList scoutEntries = FileManager.deserializeData(jsonFileList); - - this.teamNameList = FileManager.getTeamNameList(currentDataDirectory); - - this.eventReport = new EventReport(scoutEntries, eventName, currentDataDirectory); - - if (teamNameList != null) { - eventReport.setTeamNameList(teamNameList); - } - - eventReport.processEntries(); - } - - - /** - * Adds a status display to the user-facing text box, with a separator between statuses - * - * @param message Text to display to the user - */ - private void addStatus(String message) { - statusTextBox.setText(message + "\n====================\n" + statusTextBox.getText()); - } - -} diff --git a/src/main/java/org/usfirst/frc/team25/scouting/client/ui/Main.java b/src/main/java/org/usfirst/frc/team25/scouting/client/ui/Main.java index ba14289..6155701 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/client/ui/Main.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/client/ui/Main.java @@ -24,7 +24,7 @@ public void start(Stage primaryStage) throws Exception { primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/img/team_25_logo.png"))); primaryStage.setTitle("Raider Robotix Scouting Client"); - primaryStage.setScene(new Scene(root, 820, 370)); + primaryStage.setScene(new Scene(root, 820, 400)); primaryStage.setResizable(false); primaryStage.show(); diff --git a/src/main/java/org/usfirst/frc/team25/scouting/client/ui/MainController.java b/src/main/java/org/usfirst/frc/team25/scouting/client/ui/MainController.java new file mode 100644 index 0000000..a345dad --- /dev/null +++ b/src/main/java/org/usfirst/frc/team25/scouting/client/ui/MainController.java @@ -0,0 +1,312 @@ +package org.usfirst.frc.team25.scouting.client.ui; + +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.scene.Scene; +import javafx.scene.control.*; +import javafx.scene.image.Image; +import javafx.scene.text.Text; +import javafx.stage.DirectoryChooser; +import javafx.stage.Stage; +import org.usfirst.frc.team25.scouting.data.AllianceReport; +import org.usfirst.frc.team25.scouting.data.BlueAlliance; +import org.usfirst.frc.team25.scouting.data.EventReport; +import org.usfirst.frc.team25.scouting.data.FileManager; +import org.usfirst.frc.team25.scouting.data.models.ScoutEntry; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; + +public class MainController { + + @FXML + private Button chooseDataFolderButton, generateFilesButton, downloadDataButton, displayReportButton; + @FXML + private TextArea statusTextBox; + @FXML + private Text dataDirectoryDisplay; + @FXML + private CheckBox combineJson, generatePicklists, generateCsv, fixErrors, backupJson, generatePredictions; + @FXML + private RadioButton teamBasedReport, allianceBasedReport, teamEventsDownload, eventDownload, matchBasedReport; + @FXML + private TextField analysisTeamOne, analysisTeamTwo, analysisTeamThree, teamNumEventCode, analysisOppTeamOne, + analysisOppTeamTwo, analysisOppTeamThree, analysisMatchNum; + + private EventReport eventReport; + private ArrayList jsonFileList; + private String eventName; + + private File currentDataDirectory, teamNameList; + + public void initialize() { + + addStatus("Client opened!\n\nSelect data folder"); + + ToggleGroup reportGenerationGroup = new ToggleGroup(); + teamBasedReport.setToggleGroup(reportGenerationGroup); + allianceBasedReport.setToggleGroup(reportGenerationGroup); + matchBasedReport.setToggleGroup(reportGenerationGroup); + + ToggleGroup tbaDownloadGroup = new ToggleGroup(); + teamEventsDownload.setToggleGroup(tbaDownloadGroup); + eventDownload.setToggleGroup(tbaDownloadGroup); + + dataDirectoryDisplay.setText(""); + + chooseDataFolderButton.setOnAction(event -> { + DirectoryChooser directoryChooser = new DirectoryChooser(); + File selectedDirectory = directoryChooser.showDialog(chooseDataFolderButton.getScene().getWindow()); + + if (selectedDirectory == null) { + if (currentDataDirectory == null) { + addStatus("Invalid or no data directory selected!"); + } else { + addStatus(currentDataDirectory.getAbsolutePath() + " retained as data directory"); + } + } else { + currentDataDirectory = selectedDirectory; + addStatus(selectedDirectory.getAbsolutePath() + " selected as data directory"); + dataDirectoryDisplay.setText(selectedDirectory.getAbsolutePath()); + generateFilesButton.setDisable(false); + downloadDataButton.setDisable(false); + displayReportButton.setDisable(false); + + } + }); + + final TextField[] allianceBasedGroup = new TextField[]{analysisTeamTwo, analysisTeamThree}; + final TextField[] matchBasedGroup = new TextField[]{analysisOppTeamOne, analysisOppTeamTwo, + analysisOppTeamThree, analysisMatchNum}; + + allianceBasedReport.setOnAction(event -> { + enableTextFieldGroup(allianceBasedGroup, allianceBasedReport.isSelected() || matchBasedReport.isSelected()); + enableTextFieldGroup(matchBasedGroup, matchBasedReport.isSelected()); + }); + + teamBasedReport.setOnAction(event -> { + enableTextFieldGroup(allianceBasedGroup, allianceBasedReport.isSelected() || matchBasedReport.isSelected()); + enableTextFieldGroup(matchBasedGroup, matchBasedReport.isSelected()); + }); + + matchBasedReport.setOnAction(event -> { + enableTextFieldGroup(allianceBasedGroup, allianceBasedReport.isSelected() || matchBasedReport.isSelected()); + enableTextFieldGroup(matchBasedGroup, matchBasedReport.isSelected()); + }); + + generateFilesButton.setOnAction(event -> { + processData(); + }); + + downloadDataButton.setOnAction(event -> { + String response; + if (teamNumEventCode.getText().isEmpty()) { + response = "Please enter a team number or event key."; + } else if (teamEventsDownload.isSelected()) { + try { + response = BlueAlliance.downloadTeamEvents(currentDataDirectory, + Integer.parseInt(teamNumEventCode.getText())); + } catch (NumberFormatException e) { + response = teamNumEventCode.getText() + " is not a valid team number"; + } + } else { + response = BlueAlliance.downloadEventTeamData(currentDataDirectory, teamNumEventCode.getText()); + + } + + addStatus(response); + }); + + displayReportButton.setOnAction(event -> { + displayAggregateReport(); + }); + } + + private void enableTextFieldGroup(TextField[] textFields, boolean enable) { + if (enable) { + for (TextField textField : textFields) { + textField.setDisable(false); + } + } else { + for (TextField textField : textFields) { + textField.setDisable(true); + textField.setText(""); + } + } + } + + private void displayAggregateReport() { + if (eventReport == null) { + retrieveEventReport(); + } + + if (teamBasedReport.isSelected()) { + + int teamNum; + try { + teamNum = Integer.parseInt(analysisTeamOne.getText()); + if (!eventReport.isTeamPlaying(teamNum)) { + addStatus("Invalid team number for event " + eventName + ". Please try again."); + } else { + addStatus(eventReport.getTeamReport(teamNum).getQuickStatus()); + } + } catch (NumberFormatException e) { + addStatus("Invalid or missing team number. Please try again."); + } + + + } else if (allianceBasedReport.isSelected()) { + int teamOne, teamTwo, teamThree; + + try { + teamOne = Integer.parseInt(analysisTeamOne.getText()); + teamTwo = Integer.parseInt(analysisTeamTwo.getText()); + teamThree = Integer.parseInt(analysisTeamThree.getText()); + if (!eventReport.isTeamPlaying(teamOne) || !eventReport.isTeamPlaying(teamTwo) || !eventReport.isTeamPlaying(teamThree)) { + addStatus("Invalid team number(s) for event " + eventName + ". Please try again."); + } else { + AllianceReport allianceReport = eventReport.getAllianceReport(new int[]{teamOne, teamTwo, + teamThree}); + addStatus(allianceReport.getQuickAllianceReport()); + + } + } catch (NumberFormatException e) { + addStatus("Invalid or missing team number(s). Please try again."); + + } + + } else { + AllianceReport[] alliances = null; + try { + if (!analysisMatchNum.getText().isEmpty()) { + int matchNum = Integer.parseInt(analysisMatchNum.getText()); + alliances = eventReport.getAlliancesInMatch(matchNum); + } + } catch (NumberFormatException | IOException e) { + addStatus("Match schedule not found or invalid match number, trying team numbers..."); + } + + try { + + if (alliances == null) { + + } + + FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource("fxml" + + "/match_predictions.fxml")); + + Stage stage = new Stage(); + + stage.getIcons().add(new Image(getClass().getResourceAsStream("/img/team_25_logo.png"))); + stage.setTitle("Match Predictions"); + stage.setScene(new Scene(loader.load(), 968, 483)); + MatchPredictionController controller = loader.getController(); + controller.initialize(alliances); + stage.setResizable(false); + stage.show(); + + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void processData() { + + String status = ""; + + retrieveEventReport(); + + if (backupJson.isSelected()) { + FileManager.createBackup(jsonFileList, currentDataDirectory); + status += "\nBackup JSON files created"; + } + + if (fixErrors.isSelected()) { + eventReport.generateInaccuracyList(currentDataDirectory); + if (eventReport.fixInaccuraciesTBA()) { + status += "\nInaccuracies fixed and inaccuracy list generated"; + } else { + status += "\nNo inaccuracies found or Internet unavailable"; + } + } + + if (combineJson.isSelected() && eventReport.generateCombineJson(currentDataDirectory)) { + status += "\nCombined data JSON file generated"; + + if (FileManager.deleteIndividualDataFiles(currentDataDirectory)) { + status += "\nIndividual data JSON files deleted"; + } + + } + + + if (generateCsv.isSelected()) { + if (eventReport.generateRawSpreadsheet(currentDataDirectory)) { + status += "\nRaw data spreadsheet generated"; + } else { + status += "\nRaw data spreadsheet failed to generate. Are you sure the CSV file isn't open?"; + } + } + + if (generatePicklists.isSelected()) { + eventReport.generatePicklists(currentDataDirectory); + status += "\nPicklists generated"; + } + + if (generatePredictions.isSelected()) { + eventReport.generateMatchPredictions(currentDataDirectory); + status += "\nFuture match predictions generated"; + } + + + if (status.isEmpty()) { + addStatus("Please select data processing options!"); + } else { + addStatus("Data processing for event " + eventName + " successful:\n" + status); + } + + } + + + /** + * Retrieves JSON data files from the selected data directory and converts them into an EventReport for data + * processing + */ + private void retrieveEventReport() { + this.jsonFileList = FileManager.getDataFiles(currentDataDirectory); + + if (jsonFileList.size() == 0) { + addStatus("No JSON data files found in " + currentDataDirectory.getAbsolutePath() + + ".\nPlease select another directory."); + return; + } + + eventName = jsonFileList.get(0).getName().split(FileManager.FILE_EXTENSION_REGEX)[0].split(" - ")[2]; + + + ArrayList scoutEntries = FileManager.deserializeData(jsonFileList); + + this.teamNameList = FileManager.getTeamNameList(currentDataDirectory); + + this.eventReport = new EventReport(scoutEntries, eventName, currentDataDirectory); + + if (teamNameList != null) { + eventReport.setTeamNameList(teamNameList); + } + + eventReport.processEntries(); + } + + + /** + * Adds a status display to the user-facing text box, with a separator between statuses + * + * @param message Text to display to the user + */ + private void addStatus(String message) { + statusTextBox.setText(message + "\n====================\n" + statusTextBox.getText()); + } + +} diff --git a/src/main/java/org/usfirst/frc/team25/scouting/client/ui/MatchPredictionController.java b/src/main/java/org/usfirst/frc/team25/scouting/client/ui/MatchPredictionController.java new file mode 100644 index 0000000..21b400c --- /dev/null +++ b/src/main/java/org/usfirst/frc/team25/scouting/client/ui/MatchPredictionController.java @@ -0,0 +1,15 @@ +package org.usfirst.frc.team25.scouting.client.ui; + +import javafx.fxml.FXML; +import javafx.scene.text.Text; +import org.usfirst.frc.team25.scouting.data.AllianceReport; + +public class MatchPredictionController { + + @FXML + Text redTeamOneNum; + + public void initialize(AllianceReport[] alliances) { + redTeamOneNum.setText(Integer.toString(alliances[0].getTeamReports()[0].getTeamNum())); + } +} diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/AllianceReport.java b/src/main/java/org/usfirst/frc/team25/scouting/data/AllianceReport.java index ad616f1..d2c9e8f 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/AllianceReport.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/AllianceReport.java @@ -711,5 +711,9 @@ public double getAvgSampleSize() { return avgSampleSize; } + public TeamReport[] getTeamReports() { + return teamReports; + } + } diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/EventReport.java b/src/main/java/org/usfirst/frc/team25/scouting/data/EventReport.java index 5d63c29..d560743 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/EventReport.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/EventReport.java @@ -228,6 +228,7 @@ public boolean fixInaccuraciesTBA() { /** * Finds the scouting entries of alliance partners alongside the current team + * * @param entry Scouting entry of the team in the match to be queried * @return ScoutEntry array of the two partner scout entries */ @@ -518,7 +519,6 @@ public void generateInaccuracyList(File outputDirectory) { public void generatePicklists(File outputDirectory) { PicklistGenerator pg = new PicklistGenerator(scoutEntries, outputDirectory, event); - //pg.generateBogoCompareList(); pg.generateComparePointList(); pg.generatePickPointList(); } @@ -584,6 +584,36 @@ public void generateMatchPredictions(File outputDirectory) { } } + public AllianceReport[] getAlliancesInMatch(int matchNum) throws FileNotFoundException { + AllianceReport[] allianceReports = new AllianceReport[2]; + try { + File matchList = FileManager.getMatchList(directory); + + String[] matches = FileManager.getFileString(matchList).split("\n"); + for (String match : matches) { + String[] terms = match.split(","); + + if (Integer.parseInt(terms[0]) == matchNum) { + for (int i = 0; i < 2; i++) { + int[] teamNums = new int[3]; + for (int j = 0; j < 3; j++) { + teamNums[j] = Integer.parseInt(terms[j + 1 + 3 * i]); + } + allianceReports[i] = getAllianceReport(teamNums); + } + + return allianceReports; + } + } + } catch (NullPointerException e) { + e.printStackTrace(); + throw new FileNotFoundException("Match list or scouting data not found"); + } + + return allianceReports; + + } + public TeamReport getTeamReport(int teamNum) { return teamReports.get(teamNum); diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/FileManager.java b/src/main/java/org/usfirst/frc/team25/scouting/data/FileManager.java index 6e9b3b6..499d07c 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/FileManager.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/FileManager.java @@ -146,7 +146,7 @@ public static File getMatchList(File directory) { for (File file : FileManager.getFilesFromDirectory(directory)) { String fileName = file.getName(); try { - if (fileName.split(FILE_EXTENSION_REGEX)[1].equals("csv") && fileName.contains("Match")) { + if (fileName.split(FILE_EXTENSION_REGEX)[1].equals("csv") && fileName.contains("Matches")) { return file; } } catch (Exception e) { diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/TeamReport.java b/src/main/java/org/usfirst/frc/team25/scouting/data/TeamReport.java index 482fa4b..82a8787 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/TeamReport.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/TeamReport.java @@ -63,7 +63,7 @@ public TeamReport(TeamReport model) { for (String key : model.getAbilities().keySet()) { abilities.put(key, false); } - teamNum = 0; + this.teamNum = 0; teamName = ""; } diff --git a/src/main/resources/fxml/main.fxml b/src/main/resources/fxml/main.fxml index f9e4b92..df30301 100644 --- a/src/main/resources/fxml/main.fxml +++ b/src/main/resources/fxml/main.fxml @@ -7,9 +7,9 @@ - + fx:controller="org.usfirst.frc.team25.scouting.client.ui.MainController"> + text="Raider Robotix Scouting Client - v3.2"> @@ -52,28 +52,37 @@ - + - - - - -