mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Merged develop onto this branch
Tidied code, removed print statements #story[956] #pair[wmu16, mra106]
This commit is contained in:
@@ -304,14 +304,11 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
private Mark getNextMark(BoatGroup bg) {
|
||||
Integer legNumber = bg.getBoat().getLegNumber();
|
||||
|
||||
System.out.println("Leg Number: " + legNumber);
|
||||
List<XMLParser.RaceXMLObject.Corner> markSequence = StreamParser.getXmlObject().getRaceXML().getCompoundMarkSequence();
|
||||
|
||||
if (legNumber == 0) {
|
||||
System.out.println("PreStart");
|
||||
return null;
|
||||
} else if (legNumber == markSequence.size() - 1) {
|
||||
System.out.println("Finishing");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -415,19 +412,15 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
|
||||
private void updateLaylines(BoatGroup bg) {
|
||||
|
||||
System.out.println("========" + bg.getBoat().getBoatName() + "=========");
|
||||
Mark nextMark = getNextMark(bg);
|
||||
Boolean isUpwind = null;
|
||||
// Can only calc leg direction if there is a next mark and it is a gate mark
|
||||
if (nextMark != null) {
|
||||
System.out.println("Next Mark: " + nextMark.getName());
|
||||
if (nextMark instanceof GateMark) {
|
||||
if (bg.isUpwindLeg(includedCanvasController, nextMark)) {
|
||||
isUpwind = true;
|
||||
System.out.println(bg.getBoat().getBoatName() + " is on an upwind leg");
|
||||
} else {
|
||||
isUpwind = false;
|
||||
System.out.println(bg.getBoat().getBoatName() + " is on a downwind leg");
|
||||
}
|
||||
|
||||
for(MarkGroup mg : includedCanvasController.getMarkGroups()) {
|
||||
@@ -476,8 +469,6 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -240,6 +240,7 @@ public class StreamParser extends Thread {
|
||||
Long estTimeAtFinish = bytesToLong(
|
||||
Arrays.copyOfRange(payload, 38 + (i * 20), 44 + (i * 20)));
|
||||
boat.setEstimateTimeAtFinish(estTimeAtFinish);
|
||||
boatsPos.put(estTimeAtFinish, boat);
|
||||
// String boatStatus = "SourceID: " + boatStatusSourceID;
|
||||
// boatStatus += "\nBoat Status: " + (int)payload[28 + (i * 20)];
|
||||
// boatStatus += "\nLegNumber: " + (int)payload[29 + (i * 20)];
|
||||
|
||||
Reference in New Issue
Block a user