aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-08-14 08:35:00 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-08-14 08:35:00 -0700
commit3ecbff1ae54759fdf212030d7721b7c66b0ea41b (patch)
tree710c465a005a4c52e8d21a916eed4d51bd72e8c4 /src/main/java
parent127d7e59b3a21c8aa98c6f7953b86d6008f959f2 (diff)
downloadtraccar-server-3ecbff1ae54759fdf212030d7721b7c66b0ea41b.tar.gz
traccar-server-3ecbff1ae54759fdf212030d7721b7c66b0ea41b.tar.bz2
traccar-server-3ecbff1ae54759fdf212030d7721b7c66b0ea41b.zip
Fix batch decoding
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/NavisetProtocolDecoder.java4
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);