diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-04 05:35:12 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-04 13:35:56 +1300 |
commit | 8f7ed4ed8ab881c480c22f605d1ff14918a3e43f (patch) | |
tree | 8c4d6cadfae72c98c3eeea7cfdfde472da291af5 /src/org/traccar/helper | |
parent | da251c52ba6a001e85574f688455a698a6998855 (diff) | |
download | trackermap-server-8f7ed4ed8ab881c480c22f605d1ff14918a3e43f.tar.gz trackermap-server-8f7ed4ed8ab881c480c22f605d1ff14918a3e43f.tar.bz2 trackermap-server-8f7ed4ed8ab881c480c22f605d1ff14918a3e43f.zip |
Decode GPS103 DTCs (fix #2401)
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r-- | src/org/traccar/helper/ObdDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/helper/ObdDecoder.java b/src/org/traccar/helper/ObdDecoder.java index 3196c25e4..5a75fa368 100644 --- a/src/org/traccar/helper/ObdDecoder.java +++ b/src/org/traccar/helper/ObdDecoder.java @@ -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; } |