aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/model/Position.java1
-rw-r--r--src/org/traccar/protocol/AplicomProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Mta6ProtocolDecoder.java2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index 1749431a9..409b49ccb 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -32,6 +32,7 @@ public class Position extends Message {
public static final String KEY_ALARM = "alarm";
public static final String KEY_STATUS = "status";
public static final String KEY_ODOMETER = "odometer"; // meters
+ public static final String KEY_ODOMETER_SERVICE = "serviceOdometer";
public static final String KEY_ODOMETER_TRIP = "tripOdometer";
public static final String KEY_HOURS = "hours";
public static final String KEY_INPUT = "input";
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java
index 24716071c..d80c0337e 100644
--- a/src/org/traccar/protocol/AplicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java
@@ -465,7 +465,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
} else if (type == 0x06) {
position.set(Position.KEY_ODOMETER, buf.readUnsignedInt() * 5);
position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedInt() * 5);
- position.set("serviceDistance", (buf.readUnsignedInt() - 2105540607) * 5);
+ position.set(Position.KEY_ODOMETER_SERVICE, (buf.readUnsignedInt() - 2105540607) * 5);
} else if (type == 0x0A) {
ChannelBuffer brakeData = buf.readBytes(length);
position.set("absStatusCounter", brakeData.readUnsignedShort());
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
index 504539c4c..35695e177 100644
--- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
@@ -241,7 +241,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
position.set("engine", buf.readUnsignedShort() * 0.125);
position.set("pedals", buf.readUnsignedByte());
position.set(Position.PREFIX_TEMP + 1, buf.readUnsignedByte() - 40);
- position.set("serviceOdometer", buf.readUnsignedShort()); // service odometer
+ position.set(Position.KEY_ODOMETER_SERVICE, buf.readUnsignedShort()); // service odometer
}
if (BitUtil.check(flags, 3)) {