Fixed the RaceStatusDecoder not deserializing BoatStatus (a subobject of RaceStatus) properly.
RaceVisionByteEncoder.heartBeat now uses a long (and grabs the low 4 bytes from it), as the streaming spec requires a 4 byte unsigned int. #story[778] #story[782]
This commit is contained in:
+10
-3
@@ -60,9 +60,16 @@ public class RaceStatusDecoderTest {
|
||||
Assert.assertEquals(windDirection, decoderTest.getRaceWindDir());
|
||||
Assert.assertEquals(windSpeed, decoderTest.getRaceWindSpeed());
|
||||
|
||||
Assert.assertEquals(boat1Status, decoderTest.getBoats().get(0).getBoatStatus());
|
||||
Assert.assertEquals(boat1LegNumber, decoderTest.getBoats().get(0).getLegNumber());
|
||||
Assert.assertEquals(boat1PenaltiesAwarded, decoderTest.getBoats().get(0).getNumPenaltiesAwarded());
|
||||
|
||||
BoatStatus boat1 = decoderTest.getBoats().get(0);
|
||||
|
||||
Assert.assertEquals(boat1SourceID, boat1.getSourceID());
|
||||
Assert.assertEquals(boat1Status, boat1.getBoatStatus());
|
||||
Assert.assertEquals(boat1LegNumber, boat1.getLegNumber());
|
||||
Assert.assertEquals(boat1PenaltiesAwarded, boat1.getNumPenaltiesAwarded());
|
||||
Assert.assertEquals(boat1PenaltiesServed, boat1.getNumPenaltiesServed());
|
||||
Assert.assertEquals(boat1TimeAtNextMark, boat1.getEstTimeAtNextMark());
|
||||
Assert.assertEquals(boat1TimeAtFinish, boat1.getEstTimeAtFinish());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user