From c0bc2b2c1e838f1162b17dc30aa2040c648f76a7 Mon Sep 17 00:00:00 2001 From: Fan-Wu Yang Date: Mon, 15 May 2017 15:53:49 +1200 Subject: [PATCH] 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] --- .../Networking/MessageDecoders/BoatLocationDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/src/main/java/seng302/Networking/MessageDecoders/BoatLocationDecoder.java b/network/src/main/java/seng302/Networking/MessageDecoders/BoatLocationDecoder.java index b3e17945..2900cd42 100644 --- a/network/src/main/java/seng302/Networking/MessageDecoders/BoatLocationDecoder.java +++ b/network/src/main/java/seng302/Networking/MessageDecoders/BoatLocationDecoder.java @@ -95,9 +95,9 @@ public class BoatLocationDecoder { trueWindSpeed = Arrays.copyOfRange(encodedBoatLocation, 44, 46); numTrueWindSpeed = bytesToInt(trueWindSpeed); trueWindDirection = Arrays.copyOfRange(encodedBoatLocation, 46, 48); - numTrueWindDirection = bytesToShort(trueWindSpeed); + numTrueWindDirection = bytesToShort(trueWindDirection); trueWindAngle = Arrays.copyOfRange(encodedBoatLocation, 48, 50); - numTrueWindAngle = bytesToShort(trueWindSpeed); + numTrueWindAngle = bytesToShort(trueWindAngle); currentDrift = Arrays.copyOfRange(encodedBoatLocation, 50, 52); numCurrentDrift = bytesToInt(currentDrift); currentSet = Arrays.copyOfRange(encodedBoatLocation, 52, 54);