I had accidentally broken the raceXML construction - fixed it.

Fixed a few issues where boat didn't have nextMark/previousMark times under certain circumstances.
LatestMessages wasn't actually notifying properly - fixed.
The various XML readers now treat a string constructor as containing file contents, not file name - this was how it was mostly already used.
Fixed some issues in RaceXMLReader, including where element.getChildNodes() was used instead of element.getElementsByName(...).
Boat: changes speed to a doubleProperty. Changed leg to a Property<Leg>.
Race.lastFps is now an IntegerProperty.
Added breaks to the case statements in VisualiserInput. Whoops.
ResizableRaceCanvas now handles drawing the race boundary. Tidied up code a bit.
Removed ResizableRaceMap.

Started refactoring Sparkline. Currently doesn't work.
This commit is contained in:
fjc40
2017-07-10 08:35:43 +12:00
parent abbbf70146
commit 7d3cf6ee80
38 changed files with 1414 additions and 775 deletions
@@ -28,7 +28,7 @@ public class App extends Application {
System.exit(0);
}
});
FXMLLoader loader = new FXMLLoader(getClass().getResource("/scenes/main.fxml"));
FXMLLoader loader = new FXMLLoader(getClass().getResource("/visualiser/scenes/main.fxml"));
Parent root = loader.load();
Scene scene = new Scene(root, 1200, 800);
stage.setScene(scene);
@@ -220,6 +220,8 @@ public class VisualiserInput implements Runnable {
lastHeartbeatSequenceNum = heartbeat.getSequenceNumber();
//System.out.println("HeartBeat Message! " + lastHeartbeatSequenceNum);
}
break;
}
//RaceStatus.
@@ -233,12 +235,15 @@ public class VisualiserInput implements Runnable {
this.latestMessages.setBoatStatus(boatStatus);
}
break;
}
//DisplayTextMessage.
case DISPLAYTEXTMESSAGE: {
//System.out.println("Display Text Message");
//No decoder for this.
break;
}
//XMLMessage.
@@ -249,21 +254,25 @@ public class VisualiserInput implements Runnable {
this.latestMessages.setXMLMessage(xmlMessage);
break;
}
//RaceStartStatus.
case RACESTARTSTATUS: {
//System.out.println("Race Start Status Message");
break;
}
//YachtEventCode.
case YACHTEVENTCODE: {
//YachtEventCode yachtEventCode = (YachtEventCode) message;
//YachtEventCode yachtEventCode = (YachtEventCode) message;
//System.out.println("Yacht Event Code!");
//No decoder for this.
//System.out.println("Yacht Event Code!");
//No decoder for this.
break;
}
//YachtActionCode.
@@ -273,6 +282,7 @@ public class VisualiserInput implements Runnable {
//System.out.println("Yacht Action Code!");
// No decoder for this.
break;
}
//ChatterText.
@@ -282,6 +292,7 @@ public class VisualiserInput implements Runnable {
//System.out.println("Chatter Text Message!");
//No decoder for this.
break;
}
//BoatLocation.
@@ -301,6 +312,8 @@ public class VisualiserInput implements Runnable {
//If the map _doesn't_ already contain a message for this boat, insert the message.
this.latestMessages.setBoatLocation(boatLocation);
}
break;
}
//MarkRounding.
@@ -323,6 +336,7 @@ public class VisualiserInput implements Runnable {
this.latestMessages.setMarkRounding(markRounding);
}
break;
}
//CourseWinds.
@@ -333,6 +347,7 @@ public class VisualiserInput implements Runnable {
this.latestMessages.setCourseWinds(courseWinds);
break;
}
//AverageWind.
@@ -343,11 +358,14 @@ public class VisualiserInput implements Runnable {
this.latestMessages.setAverageWind(averageWind);
break;
}
//Unrecognised message.
default: {
System.out.println("Broken Message!");
break;
}
}