@ -95,7 +94,7 @@ public class StartController extends Controller implements Observer {
/**
*Countdowntimeruntilracestarts.
*/
protectedvoidcountdownTimer(){
privatevoidcountdownTimer(){
newAnimationTimer(){
@Override
publicvoidhandle(longarg0){
@ -151,7 +150,7 @@ public class StartController extends Controller implements Observer {
setRaceClock();
if(visualiserInput.getRaceStatus()==null){
return;//TEMP BUG FIX if the race isn't sending race status messages (our mock currently doesn't), then it would block the javafx thread with the previous while loop.
};// TODO - replace with observer on VisualiserInput
}// TODO - replace with observer on VisualiserInput
setStartingTime();
setCurrentTime();
});
@ -163,7 +162,6 @@ public class StartController extends Controller implements Observer {
privateColor[]colors={Color.BLUEVIOLET,Color.BLACK,Color.RED,Color.ORANGE,Color.DARKOLIVEGREEN,Color.LIMEGREEN};//TODO make this established in xml or come up with a better system.
privateList<Leg>legs=newArrayList<>();
privatefinalList<Boat>boats=newArrayList<>();
privatefinalColor[]colors={Color.BLUEVIOLET,Color.BLACK,Color.RED,Color.ORANGE,Color.DARKOLIVEGREEN,Color.LIMEGREEN};//TODO make this established in xml or come up with a better system.
///A queue that contains messages that have been received, and need to be handled.
privateArrayBlockingQueue<AC35Data>messagesReceivedQueue=newArrayBlockingQueue<>(1000000);//We have room for 1,000,000. Is this much capacity actually needed?
privatefinalArrayBlockingQueue<AC35Data>messagesReceivedQueue=newArrayBlockingQueue<>(1000000);//We have room for 1,000,000. Is this much capacity actually needed?
///Timestamp of the last heartbeat.
privatelonglastHeartbeatTime=-1;
///Sequence number of the last heartbeat.
privatelonglastHeartbeatSequenceNum=-1;
///How long we should wait for a heartbeat before assuming the connection is dead. Measured in milliseconds.
privatelongheartBeatPeriod=10*1000;
///The socket that we have connected to.
privateSocketconnectionSocket;
@ -43,10 +41,10 @@ public class VisualiserInput implements Runnable {
privateRaceStatusraceStatus;
///A map of the last BoatStatus message received, for each boat.