aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TytanProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-17 16:38:02 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-17 16:38:02 +1200
commitd643e9a75f1c6580d098b68cffc2c709db611d8e (patch)
treeb0d146aaa67352c46d4c5cfbd19aaa2cf6d2973e /src/org/traccar/protocol/TytanProtocolDecoder.java
parent1c756c57653b72a656407da9c53ac292c5551cdb (diff)
downloadtrackermap-server-d643e9a75f1c6580d098b68cffc2c709db611d8e.tar.gz
trackermap-server-d643e9a75f1c6580d098b68cffc2c709db611d8e.tar.bz2
trackermap-server-d643e9a75f1c6580d098b68cffc2c709db611d8e.zip
Normalize fuel level value
Diffstat (limited to 'src/org/traccar/protocol/TytanProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TytanProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java
index e358e60b1..030fbce78 100644
--- a/src/org/traccar/protocol/TytanProtocolDecoder.java
+++ b/src/org/traccar/protocol/TytanProtocolDecoder.java
@@ -100,11 +100,11 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder {
int fuel = buf.readUnsignedShort();
int fuelFormat = fuel >> 14;
if (fuelFormat == 1) {
- position.set(Position.KEY_FUEL_LEVEL, (fuel & 0x3fff) * 0.4 + "%");
+ position.set("fuelValue", (fuel & 0x3fff) * 0.4 + "%");
} else if (fuelFormat == 2) {
- position.set(Position.KEY_FUEL_LEVEL, (fuel & 0x3fff) * 0.5 + " l");
+ position.set("fuelValue", (fuel & 0x3fff) * 0.5 + " l");
} else if (fuelFormat == 3) {
- position.set(Position.KEY_FUEL_LEVEL, (fuel & 0x3fff) * -0.5 + " l");
+ position.set("fuelValue", (fuel & 0x3fff) * -0.5 + " l");
}
break;
case 108: