mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Discovered the time valid timestamp in the boat location packet is quite inconsistent and either the stream or my implementation is making the display really buggy. Because the way it was before I changed things is more reliable at the moment, I have decided to wait until our mock stream is merged before continuing this development. #story[820]
This commit is contained in:
@@ -78,9 +78,6 @@ public class StreamReceiver extends Thread {
|
||||
long computedCrc = checksum.getValue();
|
||||
long packetCrc = bytesToLong(getBytes(4));
|
||||
if (computedCrc == packetCrc) {
|
||||
// System.out.println("message type: " + type);
|
||||
// System.out.println("timeStamp = " + timeStamp);
|
||||
// System.out.println("payload length: " + payloadLength);
|
||||
packetBuffer.add(new StreamPacket(type, payloadLength, timeStamp, payload));
|
||||
} else {
|
||||
System.err.println("Packet has been dropped");
|
||||
@@ -126,7 +123,7 @@ public class StreamReceiver extends Thread {
|
||||
* takes an array of up to 7 bytes and returns a positive
|
||||
* long constructed from the input bytes
|
||||
*
|
||||
* @return a positive long if there is less than 7 bytes -1 otherwise
|
||||
* @return a positive long if there is less than 8 bytes -1 otherwise
|
||||
*/
|
||||
private long bytesToLong(byte[] bytes){
|
||||
long partialLong = 0;
|
||||
|
||||
Reference in New Issue
Block a user