Commit Graph
544 Commits
Author SHA1 Message Date
Jessica McAuslin 2e1f8a2e9a Lowered frequency sparkline updates
- sparkline only updates when a boat passes a point
- all lines start in the middle
- slow frame rate issue resolved

#story[876]
2017-05-17 19:15:28 +12:00
David Wu f999967cd5 Implemented functionality for sparkline to update throughout race.
-Sparkline reads in initial boats in race.
-Sparkline updates throughout the race.
-Sparkline updates are displayed on GUI.

#story[876]
2017-05-16 17:13:52 +12:00
Jessica McAuslin 7647a93d7a Implemented an updating sparkline
- sparkline is set with X number of lines
- sparkline height fits X lines
- lines are updated regularly
- size is adjusted relevant to plotted points

#story[876]
2017-05-15 20:59:16 +12:00
Fan-Wu Yang 7990ac9d2e Merge branch 'Story49Vis' into 'master'
Story49



See merge request !1
2017-05-15 15:58:21 +12:00
Fan-Wu Yang c0bc2b2c1e Merged Mock49 and fixed bugs
- Error where mock would not read in the files when running from the jar.
- Error where the AC35 stream now no longer sends us packets with information that is set for 0 for boat location.
#story[881] #pair[fwy13, esa46]
2017-05-15 15:53:49 +12:00
Fan-Wu Yang b065b8d9c7 Merged Mock49 and fixed bugs
- Error where mock would not read in the files when running from the jar.
- Error where the AC35 stream now no longer sends us packets with information that is set for 0 for boat location.
#story[881] #pair[fwy13, esa46
2017-05-15 15:49:38 +12:00
Fan-Wu Yang 7bfb6bb968 Merge remote-tracking branch 'origin/49Mock' into Story49Vis
# Conflicts:
#	visualiser/src/test/java/seng302/Model/RaceXMLTest.java
2017-05-15 14:01:16 +12:00
Fan-Wu Yang f011b4117e Added and removed javadoc tests that were making errors in the code, #story[881] 2017-05-14 16:24:17 +12:00
Fan-Wu Yang a7a065825a Fixed thread issue on windows
- Added a Platform.runLater on the Visualiser loops so that the notifying observers do not try to call it, where it is a non java-fx loop
#story[881]
2017-05-14 16:18:11 +12:00
Fan-Wu Yang 156e0bfdd5 removed blocking queue that somehow appeared again
- Removed blolcking queue from Visualiser Input that had appeared miraculously
#story[881]
2017-05-14 16:14:45 +12:00
Fan-Wu Yang 294627074d Commented out throws in the BinaryMessageDecoder for messages we ignore as they were not errors and instead were causing the program to stop if they're received
- commented out throw from default, chatter text, yachactioncode, yachteventcode, displaytextmessage states
#story[881]
2017-05-14 16:13:37 +12:00
Fan-Wu Yang b2d9e44d03 Deleted Unecessary code
- StreamedRace no longer sets the positions of boats
- The Visualiser has blocking queue removed
- The Regatta XML Reader not longer has a variable to the deleted Regatta class
#story[881]
2017-05-14 15:36:40 +12:00
Fan-Wu Yang 30beef29ba Deleted Regatta XMl reading that is deprecated
- No longer in use XML reader has been deleted
#story[881]
2017-05-14 15:29:52 +12:00
Fan-Wu Yang 3570e1283f Deleted Race class
- Delete dependency on Race class from Streamed Race as there is no need for extention after the split of Visualiser and Mock.
#story[881]
2017-05-14 15:24:19 +12:00
Fan-Wu Yang f8c6e500fb Deleted deprecated Race XML reader
- Deleted RaceXMLReader class
- Deleted Corresponding Tests
#story[882]
2017-05-14 15:14:32 +12:00
Erika Savell fb6420524d Adding a parameter to test command to debug missing library 2017-05-13 11:57:47 +12:00
Erika Savell 493932b93f Merged with visualiser side of mark boats
#story[881]
2017-05-12 10:27:55 +12:00
Erika Savell 0ed02962a1 Merge branch 'Story49Vis' into 49Mock
# Conflicts:
#	visualiser/src/main/java/seng302/Mock/StreamedCourseXMLReader.java
#	visualiser/src/main/java/seng302/Model/CompoundMark.java
#	visualiser/src/main/java/seng302/Model/ResizableRaceCanvas.java
#	visualiser/src/main/java/seng302/VisualiserInput.java
2017-05-12 09:53:07 +12:00
zwu18 a91bc459f7 Implemented functionality for mock to parse marker boats throughout race.
-Added getter to CompoundMark to get the Mark value.

#story[881]
2017-05-12 02:10:17 +12:00
Erika Savell 5708db1936 Ignoring all new race tests
- Thought they they would be ok bc not calling animation timer directly
- Was mistaken

#story[881]
2017-05-11 16:33:00 +12:00
Erika Savell 799e588145 Unignored a couple of GPS tests
- The issue was with accuracy. Average of two coords is fine fo two point fairly close together (<1km), but not for very very large distances.
- We only ever use it for small ranges so changed tests to reflect that

#story[881]
2017-05-11 16:01:44 +12:00
Jessica McAuslin d294ee7994 Deleted redundant and deprecated code (Visualiser)
- References to deprecated objects replaced
- Deprecated Constants class removed
- general redundant code deleted
2017-05-11 15:44:58 +12:00
Erika Savell 11f6dee301 Added a number of race tests.
- Still unable to get animation timer tests working. May be necessary to make handle() hold nothing but a method call

#story[881]
2017-05-11 15:43:12 +12:00
Erika Savell 0bb18c7957 Temporarily ignoring animation tests
- The VMs don't have the necessary libraries to run them

#story[881]
2017-05-11 13:34:26 +12:00
Erika Savell 892bfd9676 Began on tests for Race class.
- Made really good progress using Mockito and calling .handle() on animation timers

#story[881]
2017-05-11 01:22:28 +12:00
Erika Savell fd036c1835 Refactored countdown timer in race class
- Also fixed all boats having ame velocity

#story[881]
2017-05-11 00:51:34 +12:00
Erika Savell a35d9cbc5a Re-refactored Event class
#story[881]
2017-05-10 23:54:29 +12:00
Erika Savell e7f84eaf83 Refactored Event Class
#story[881]
2017-05-10 23:43:42 +12:00
Erika Savell 1a780d6955 Fixed spread starting positions being reset at start of race
#story[881]
2017-05-10 23:31:32 +12:00
Erika Savell af3dfbad05 Fixed boats not displayinggit stash
- Was gps coordinates being initialised with X and Y switched around

#story[881]
2017-05-10 22:33:29 +12:00
Erika Savell 081a7d5666 Attempting to solve boats not apearing problem
- Appears to be becaus elat and long are getting switched somewhere

#story[881]
2017-05-10 22:23:49 +12:00
Erika Savell ffa3d530ae Event takes string and sets time of race
- RaceXmlReaders can handle strings now
- Not working with visualiser, gps coords may be worng

#story[881]
2017-05-10 21:46:24 +12:00
cbt24 91b1773703 Commented out obsolete tests, may be useful if refactored.
#story[881]
2017-05-10 17:02:25 +12:00
cbt24 f31a987787 Reads BoatDataSource into StreamedCourseXMLReader so the latter can function as a single source of static information for the race.
- Mock.StreamedCourseXMLReader populates participant and mark list from BoatDataSource
- Added CompoundMarker class to accommodate Mark data from Boat XML
- Had to check for Yacht type in Visualiser.BoatXMLReader
- Added a missing coordinate value to raceTest.xml
- Marker class still exists due to large number of tests, which should be transitioned to CompoundMark
- IMPORTANT: race is no longer functional

#story[881]
2017-05-10 16:56:21 +12:00
Fan-Wu Yang 045e69a637 Deleted and Fixed some redundant code
- Deleted some unused functions
- Fixed NullPointerException for Marks
#story[881] #pair[fwy13,jam339]
2017-05-10 15:51:55 +12:00
Fan-Wu Yang 9e19ddb1f4 Story 49 Marks move with boat location.
- Commented out blocking array as it was unecessary
- Added Observable list for markers to the race canvas
- Added SourceId's to Marker
- Added updating Markers from the Streamed Race loop.
#story[881] #pair[fwy13, jam339]
2017-05-10 14:45:42 +12:00
cbt24 9902cec688 Added tests for BoatXMLReader
- Verifies correct operation on boat and mark reading from boatTest.xml

#story[782]
2017-05-10 14:23:33 +12:00
cbt24 9aa4183a7c Merge remote-tracking branch 'origin/49Mock' into 49Mock 2017-05-10 13:57:36 +12:00
cbt24 69cd44bda8 Reads data from boat XML file
- Creates marks for building CompoundMarks (formerly Markers)
- Rearranged Boat constructor and removed velocity

#story[782]
2017-05-10 13:57:20 +12:00
Erika Savell 16d3fe2ef2 Added marker boats with correct gps positions into boats xml read by mock
#story[881]
2017-05-10 13:50:28 +12:00
Erika Savell 83d6cdbd59 Edited race xml read by mock
- It now includes source ids
- Legs are in the correct sequence order for the example race

#story[881]
2017-05-10 13:37:32 +12:00
cbt24 6e9386f4fb Switched mock to send out official xmls.
- Not reading official xmls yet

#story[881], #pair[cbt24, esa46]
2017-05-10 13:08:34 +12:00
Erika Savell 1b6693a19b Added xml files for mock to read in
- In process of switching to reading official xml format instead of our own

#story[881]
2017-05-10 12:39:58 +12:00
Jessica McAuslin 43757b34d1 General code tidy up (Visualiser)
- access modifiers adjusted
- unused declarations removed
- spelling fixes
- removed redundant code
2017-05-08 20:45:00 +12:00
Jessica McAuslin 2d983eccfd General code tidy up
- access modifiers adjusted
- unused declarations removed
- spelling fixes
- removed redundant code
2017-05-08 20:21:20 +12:00
Joseph Gardner e1ba2ae5b6 Now reads course wind direction from the live stream, so the wind arrow now changes when the wind changes. #story[882] 2017-05-08 17:23:55 +12:00
fjc40 a32775eab6 Fixed a few javadoc issues. 2017-05-08 10:59:13 +12:00
fjc40 b247244665 Did some large tidy ups, refactoring, and documenting.
Network:
Moved the Network message classes from the Utils package to the Messages package.
Renamed BoatLocationMessage to BoatLocation and BoatStatusMessage to BoatStatus to be consistent with other message classes.
Renamed the BoatStatus enumeration to BoatStatusEnum as it conflicted with BoatStatus (the message).
Moved the BoatStatusEnum and MessageType enumerations from the Utils package to the Messages/Enums package.
Changed the BoatStatusEnum and MessageType enumerations to use map look ups in the enum.fromByte(b) method - this means that there's less copy and pasted values, and the fromByte function doesn't need to be modified if new enumerations are added.
Added a sequenceNumber member to the Heartbeat class.
Added an InvalidMessageException in the package Networking/Exceptions. This is thrown when a message is read, but it is invalid in some way.
Refactored/tidied up the Networking/BinaryMessageEncoder and Decoder classes. The decoder throws InvalidMessageExceptions instead of returning null.

Visualiser:
VisualiserInput now wraps a DataInputStream around the socket. This provides the stream.readFully(buffer) function, which is a blocking read, removing the need for busy wait loops. Replaced the getBytes() function with getNextMessage() and getNextMessageBytes(). These read the next message from the socket, and return it as a message object and a byte array, respectively.
Changed the current heartbeat timeout to 10 seconds. Added some work-in-progress code to attempt to reconnect when connection is lost. It currently doesn't work. I think Fan-Wu was doing a proper implementation, however.
VisualiserInput also has a queue of received events. Currently not really used, but could be useful in the future. Events get added as they are read.
Changed VisualiserInputs main loop to use instanceOf instead of switch+case. Feedback wanted - are there any downsides to using this instanceOf method?

#story[778,782]
2017-05-08 03:29:33 +12:00
fjc40 466e22437b Visualiser. The nullptr issues relating to the XML data files appears to be fixed. Essentially, the StartController.startRaceNoScaling() function was being called as soon possible, before it was even ready - setRaceClock either hadn't been called or hadn't finished executing yet, so the StartController.raceClock member was null, causing crashes.
Also changed the while(visualiserInput.getRaceStatus() == null) loops to an if-then-return early block. They caused the program to freeze if the race data source wasn't sending any race status messages (currently, our mock doesn't send any once the race has finished).

#story[782]
2017-05-07 18:34:44 +12:00
fjc40 020c0329b0 Merge remote-tracking branch 'origin/TCPDisconnection' into submission 2017-05-07 16:55:07 +12:00