aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-02-25 21:26:17 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-03-04 16:27:02 -0500
commit149317fd5d53566f0902ff627ca3810f2130bbca (patch)
treebb5ee6e1343eac5d102746243af382eecf47f78e
parente46acd56d4db57dfd8010c320cf26bef1f8666c7 (diff)
downloadtrackermap-server-149317fd5d53566f0902ff627ca3810f2130bbca.tar.gz
trackermap-server-149317fd5d53566f0902ff627ca3810f2130bbca.tar.bz2
trackermap-server-149317fd5d53566f0902ff627ca3810f2130bbca.zip
Added Position.KEY_ODOMETER_SERVICE;
-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)) {