aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/TytanProtocolDecoder.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java
index b0c1d243b..4cc84d2c3 100644
--- a/src/org/traccar/protocol/TytanProtocolDecoder.java
+++ b/src/org/traccar/protocol/TytanProtocolDecoder.java
@@ -81,16 +81,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: