aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Mta6ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-04 11:27:23 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-04 11:27:23 +1200
commit57aec3786c265baac375720e5c5389035f12591b (patch)
tree18f4afc99aad4b5af2b6c2526cbde635e8cddb18 /src/org/traccar/protocol/Mta6ProtocolDecoder.java
parent93feb8a5484fd6c4c3da2032d4c843b3194b5ff7 (diff)
downloadtrackermap-server-57aec3786c265baac375720e5c5389035f12591b.tar.gz
trackermap-server-57aec3786c265baac375720e5c5389035f12591b.tar.bz2
trackermap-server-57aec3786c265baac375720e5c5389035f12591b.zip
More other data cleanup
Diffstat (limited to 'src/org/traccar/protocol/Mta6ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Mta6ProtocolDecoder.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
index 3d977706f..7d4ead62c 100644
--- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
@@ -167,8 +167,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
}
if (checkBit(flags, 4)) {
- position.set(Event.KEY_FUEL, buf.readUnsignedInt());
- position.set("fuel2", buf.readUnsignedInt());
+ position.set(Event.KEY_FUEL, buf.readUnsignedInt() + "|" + buf.readUnsignedInt());
position.set("hours1", buf.readUnsignedShort());
position.set("hours2", buf.readUnsignedShort());
}
@@ -183,7 +182,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
if (checkBit(flags, 6)) {
position.set(Event.PREFIX_TEMP + 1, buf.readByte());
buf.getUnsignedByte(buf.readerIndex()); // control (>> 4)
- position.set("sensor", buf.readUnsignedShort() & 0x0fff);
+ position.set(Event.KEY_INPUT, buf.readUnsignedShort() & 0x0fff);
buf.readUnsignedShort(); // old sensor state (& 0x0fff)
}
@@ -261,7 +260,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
if (checkBit(flags, 4)) {
position.set(Event.PREFIX_TEMP + 1, buf.readByte());
buf.getUnsignedByte(buf.readerIndex()); // control (>> 4)
- position.set("sensor", buf.readUnsignedShort() & 0x0fff);
+ position.set(Event.KEY_INPUT, buf.readUnsignedShort() & 0x0fff);
buf.readUnsignedShort(); // old sensor state (& 0x0fff)
}