diff options
author | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-27 03:45:22 -0200 |
---|---|---|
committer | Rafael Guterres <guterresrafael@gmail.com> | 2015-11-27 03:45:22 -0200 |
commit | ca06e8d38c0bbd5a68e63ebada8e115da252b055 (patch) | |
tree | 39c00c4ceb571cae540d4c25d38ad3d45c72b49c /src/org/traccar/protocol/TytanProtocolDecoder.java | |
parent | c57bd2d472467b1b3a45aee1b97c9a0aeef5958a (diff) | |
parent | 7db2eb1ad224bf00608ebbcfe13bfa7fd519a7fc (diff) | |
download | trackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.tar.gz trackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.tar.bz2 trackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.zip |
Merge tananaev/master
Conflicts:
src/org/traccar/web/WebServer.java
Diffstat (limited to 'src/org/traccar/protocol/TytanProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TytanProtocolDecoder.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java index b0c1d243b..40861bacb 100644 --- a/src/org/traccar/protocol/TytanProtocolDecoder.java +++ b/src/org/traccar/protocol/TytanProtocolDecoder.java @@ -18,10 +18,8 @@ package org.traccar.protocol; import java.net.SocketAddress; import java.nio.charset.Charset; import java.util.Date; -import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; -import java.util.Set; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; @@ -81,16 +79,8 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder { position.set("authorized", ChannelBuffers.hexDump(buf.readBytes(8))); break; case 24: - Set<Integer> temps = new LinkedHashSet<>(); - int temp = buf.readUnsignedByte(); - for (int i = 3; i >= 0; i--) { - n = (temp >> (2 * i)) & 0x03; - if (!temps.contains(n)) { - temps.add(n); - } - } - for (int i : temps) { - position.set(Event.PREFIX_TEMP + i, buf.readUnsignedByte()); + for (int i = 0; i < length / 2; i++) { + position.set(Event.PREFIX_TEMP + buf.readUnsignedByte(), buf.readByte()); } break; case 28: |