Polar table is now parsed form the stored file in resources on startup in main

story[956]
This commit is contained in:
William Muir
2017-05-22 15:45:16 +12:00
parent 87150b3c72
commit 08eacacfd4
+4 -2
View File
@@ -5,6 +5,7 @@ import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import seng302.models.PolarTable;
import seng302.models.stream.StreamParser;
import seng302.models.stream.StreamReceiver;
import seng302.server.ServerThread;
@@ -13,6 +14,8 @@ public class App extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
PolarTable.parsePolarFile(getClass().getResource("/config/acc_polars.csv").getFile());
Parent root = FXMLLoader.load(getClass().getResource("/views/MainView.fxml"));
primaryStage.setTitle("RaceVision");
primaryStage.setScene(new Scene(root));
@@ -62,7 +65,7 @@ public class App extends Application {
}
}
//Change the StreamReceiver in this else block to change the default data source.
else{
else {
// sr = new StreamReceiver("localhost", 4949, "RaceStream");
sr = new StreamReceiver("livedata.americascup.com", 4941, "RaceStream");
// sr = new StreamReceiver("csse-s302staff.canterbury.ac.nz", 4941, "RaceStream");
@@ -73,7 +76,6 @@ public class App extends Application {
streamParser.start();
launch(args);
}
}