diff options
author | Ivan Muratov <binakot@gmail.com> | 2017-07-14 11:32:42 +0300 |
---|---|---|
committer | Ivan Muratov <binakot@gmail.com> | 2017-07-14 11:32:42 +0300 |
commit | b9c6471bef5d8388a7bca80bc7a282d5fd4bd0d2 (patch) | |
tree | 142c1ef478b721c78fe8d46c5f8d3d66950c98b9 | |
parent | a71dd10a966b491c64232180a2075450f0a258db (diff) | |
parent | 6c7ef5fad28f65b1bf2693c25759517d69317f6e (diff) | |
download | trackermap-server-b9c6471bef5d8388a7bca80bc7a282d5fd4bd0d2.tar.gz trackermap-server-b9c6471bef5d8388a7bca80bc7a282d5fd4bd0d2.tar.bz2 trackermap-server-b9c6471bef5d8388a7bca80bc7a282d5fd4bd0d2.zip |
Merge branch 'master' into arnavi4_remarks
-rw-r--r-- | src/org/traccar/protocol/Arnavi4ProtocolDecoder.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Arnavi4ProtocolDecoder.java b/src/org/traccar/protocol/Arnavi4ProtocolDecoder.java index e2a1da29f..682fc1577 100644 --- a/src/org/traccar/protocol/Arnavi4ProtocolDecoder.java +++ b/src/org/traccar/protocol/Arnavi4ProtocolDecoder.java @@ -78,8 +78,8 @@ public class Arnavi4ProtocolDecoder extends BaseProtocolDecoder { position.setCourse(buf.readUnsignedByte() * 2.0); position.setAltitude(buf.readUnsignedByte() * 10.0); byte satellites = buf.readByte(); - position.set(Position.KEY_SATELLITES, satellites & 0x0F + (satellites >> 4) & 0x0F); // gps + glonass - position.setSpeed(buf.readByte() * 1.852); + position.set(Position.KEY_SATELLITES, satellites & 0x0F + (satellites >> 4) & 0x0F); // gps+glonass + position.setSpeed(buf.readUnsignedByte() * 1.852); break; default: @@ -158,6 +158,8 @@ public class Arnavi4ProtocolDecoder extends BaseProtocolDecoder { if (recordType == RECORD_DATA) { positions.add(decodePosition(deviceSession, buf, length, time)); + } else { + buf.readBytes(length); // Skip other records } buf.readUnsignedByte(); // crc |