diff options
author | Anshul Jain <anshuljain1985@gmail.com> | 2017-08-28 14:10:13 +0530 |
---|---|---|
committer | Anshul Jain <anshuljain1985@gmail.com> | 2017-08-28 14:10:13 +0530 |
commit | 538ef8e3f04dd4108b16dc39f3df3e535c7dea7f (patch) | |
tree | f873fc3d49f759a19fe297520f73d11deb2ec6ff /src/org/traccar/protocol | |
parent | b90dfecfdc127d1870f5f61db177f8d63fb9a095 (diff) | |
download | trackermap-server-538ef8e3f04dd4108b16dc39f3df3e535c7dea7f.tar.gz trackermap-server-538ef8e3f04dd4108b16dc39f3df3e535c7dea7f.tar.bz2 trackermap-server-538ef8e3f04dd4108b16dc39f3df3e535c7dea7f.zip |
Added new column to determine for extended or basic decode.
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index dbbaeaf03..cf2b8c928 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -191,7 +191,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { return true; } - private boolean decodeLbs(Position position, ChannelBuffer buf, boolean hasLength) { + private boolean decodeLbs(Position position, ChannelBuffer buf, boolean hasLength, boolean isExtended) { int length = 0; if (hasLength) { @@ -205,7 +205,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedShort(), buf.readUnsignedByte(), buf.readUnsignedShort(), buf.readUnsignedMedium()))); if (length > 0) { - if (hasLength) { + if (hasLength && !isExtended) { buf.skipBytes(length - 9); } else { buf.skipBytes(length - 8); @@ -468,7 +468,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { } if (hasLbs(type)) { - decodeLbs(position, buf, hasStatus(type)); + decodeLbs(position, buf, hasStatus(type), false); } if (hasStatus(type)) { @@ -580,7 +580,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { getLastLocation(position, position.getDeviceTime()); } - decodeLbs(position, buf, true); + decodeLbs(position, buf, true, true); buf.skipBytes(buf.readUnsignedByte()); // additional cell towers buf.skipBytes(buf.readUnsignedByte()); // wifi access point |