aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Mta6ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-18 12:01:58 +0300
committerGitHub <noreply@github.com>2016-08-18 12:01:58 +0300
commit3826a93f1009942e22ec80c1e13be71e8e917b01 (patch)
treea92de4071af67c80253b429de2bd0c905c304aea /src/org/traccar/protocol/Mta6ProtocolDecoder.java
parentbfacd794c443f0f54a27d5d52b33de4628a36009 (diff)
parent82dc8263796169899fe154671781edb2e46cac9a (diff)
downloadtrackermap-server-3826a93f1009942e22ec80c1e13be71e8e917b01.tar.gz
trackermap-server-3826a93f1009942e22ec80c1e13be71e8e917b01.tar.bz2
trackermap-server-3826a93f1009942e22ec80c1e13be71e8e917b01.zip
Merge pull request #2223 from Abyss777/fuel
Some fuel attributes organization
Diffstat (limited to 'src/org/traccar/protocol/Mta6ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Mta6ProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
index 609f0b63e..b6aea9092 100644
--- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
@@ -159,7 +159,8 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
}
if (BitUtil.check(flags, 4)) {
- position.set(Position.KEY_FUEL, buf.readUnsignedInt() + "|" + buf.readUnsignedInt());
+ position.set(Position.KEY_FUEL_CONSUMPTION + "Accumulator1", buf.readUnsignedInt());
+ position.set(Position.KEY_FUEL_CONSUMPTION + "Accumulator2", buf.readUnsignedInt());
position.set("hours1", buf.readUnsignedShort());
position.set("hours2", buf.readUnsignedShort());
}
@@ -231,7 +232,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
}
if (BitUtil.check(flags, 1)) {
- new FloatReader().readFloat(buf); // fuel consumtion
+ position.set(Position.KEY_FUEL_CONSUMPTION, new FloatReader().readFloat(buf));
position.set("hours", new FloatReader().readFloat(buf));
position.set("tank", buf.readUnsignedByte() * 0.4);
}