diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/NavisetProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/NavisetProtocolDecoder.java b/src/main/java/org/traccar/protocol/NavisetProtocolDecoder.java index d67fae78c..10d71d76c 100644 --- a/src/main/java/org/traccar/protocol/NavisetProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/NavisetProtocolDecoder.java @@ -72,15 +72,15 @@ public class NavisetProtocolDecoder extends BaseProtocolDecoder { return null; } + int blockMask = buf.readUnsignedByte(); + while (buf.readableBytes() > 2) { Position position = new Position(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); - int blockMask = buf.readUnsignedByte(); position.set(Position.KEY_INDEX, buf.readUnsignedShortLE()); position.set(Position.KEY_STATUS, buf.readUnsignedByte()); - position.setValid(true); position.setTime(new Date(buf.readUnsignedIntLE() * 1000)); position.setLatitude(buf.readUnsignedIntLE() * 0.000001); |