aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-02-24 16:59:45 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-02-24 16:59:45 +1300
commitb6b565858154dd8293829ee7f4d982178d97a0a3 (patch)
tree047a3abb11a36cb77b6b90656f8ecad58150b530
parentdebe7092f6d48abc51852b808f45144863baebde (diff)
downloadtrackermap-server-b6b565858154dd8293829ee7f4d982178d97a0a3.tar.gz
trackermap-server-b6b565858154dd8293829ee7f4d982178d97a0a3.tar.bz2
trackermap-server-b6b565858154dd8293829ee7f4d982178d97a0a3.zip
Save OBD cleared distance value
-rw-r--r--src/org/traccar/helper/ObdDecoder.java2
-rw-r--r--test/org/traccar/protocol/UlbotechProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/helper/ObdDecoder.java b/src/org/traccar/helper/ObdDecoder.java
index 35fa4dc07..f52216cae 100644
--- a/src/org/traccar/helper/ObdDecoder.java
+++ b/src/org/traccar/helper/ObdDecoder.java
@@ -69,7 +69,7 @@ public final class ObdDecoder {
case PID_FUEL_LEVEL:
return createEntry(Event.KEY_FUEL, intValue * 100 / 255);
case PID_DISTANCE_CLEARED:
- return createEntry(Event.KEY_FUEL, intValue);
+ return createEntry("cleared-distance", intValue);
default:
return null;
}
diff --git a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
index e87e95efe..edee9930d 100644
--- a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
@@ -10,6 +10,9 @@ public class UlbotechProtocolDecoderTest extends ProtocolTest {
UlbotechProtocolDecoder decoder = new UlbotechProtocolDecoder(new UlbotechProtocol());
+ verifyPosition(decoder, binary(
+ "f8010103515790566431569e5fbb9d010e015ee2b906bde4a000000000009f03040a4000000404000115fe05060340173f22030711310583410c0000310d00312f834131000008040000b78c09077320290082c021100101120af8"));
+
verifyNothing(decoder, binary(
"2a545330312c33353430343330353133383934363023"));