aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/ObdDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/helper/ObdDecoder.java')
-rw-r--r--src/org/traccar/helper/ObdDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/helper/ObdDecoder.java b/src/org/traccar/helper/ObdDecoder.java
index 3196c25e4..aea23ca60 100644
--- a/src/org/traccar/helper/ObdDecoder.java
+++ b/src/org/traccar/helper/ObdDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2015 - 2016 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ public final class ObdDecoder {
StringBuilder codes = new StringBuilder();
for (int i = 0; i < value.length() / 4; i++) {
int numValue = Integer.parseInt(value.substring(i * 4, (i + 1) * 4), 16);
- codes.append(',');
+ codes.append(' ');
switch (numValue >> 14) {
case 1:
codes.append('C');
@@ -78,7 +78,7 @@ public final class ObdDecoder {
codes.append(String.format("%04X", numValue & 0x3FFF));
}
if (codes.length() > 0) {
- return createEntry("dtcs", codes.toString().replaceFirst(",", ""));
+ return createEntry(Position.KEY_DTCS, codes.toString().trim());
} else {
return null;
}