Fixed an issue where buffers aren't being sent properly

Tags #Story[829]
This commit is contained in:
Michael Rausch
2017-04-30 16:16:44 +12:00
parent 9a995ddcc1
commit 1cf55f3e96
10 changed files with 35 additions and 13 deletions
@@ -135,7 +135,7 @@ public class BoatLocationMessage extends Message {
heading = (heading + 180.0) % 360.0;
long headingToSend = (long)((heading/360.0)*65535.0);
long headingToSend = (long)((heading/360.0)*49152.0);
putByte((byte) messageVersionNumber);
putInt(time, 6);
@@ -35,6 +35,7 @@ public class Heartbeat extends Message {
putUnsignedInt(seqNo, 4);
writeCRC();
rewind();
outputStream.write(getBuffer());
}
@@ -55,6 +55,7 @@ public class MarkRoundingMessage extends Message{
putByte((byte) markId);
writeCRC();
rewind();
outputStream.write(getBuffer());
}
@@ -9,7 +9,7 @@ public enum MessageType {
RACE_STATUS(12),
DISPLAY_TEXT_MESSAGE(20),
XML_MESSAGE(26),
RACE_START_STATUS(20),
RACE_START_STATUS(27),
YACHT_EVENT_CODE(29),
YACHT_ACTION_CODE(31),
CHATTER_TEXT(36),
@@ -52,6 +52,7 @@ public class RaceStartStatusMessage extends Message {
putUnsignedByte((byte) notificationType.getType());
writeCRC();
rewind();
outputStream.write(getBuffer());
}
@@ -85,6 +85,8 @@ public class RaceStatusMessage extends Message{
}
writeCRC();
rewind();
outputStream.write(getBuffer());
}
@@ -62,6 +62,7 @@ public class XMLMessage extends Message{
putBytes(content.getBytes());
writeCRC();
rewind();
outputStream.write(getBuffer());
}