diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-28 11:53:04 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-28 11:53:04 +1300 |
commit | 2a690606569f042b845da1f61b308698645ad3fc (patch) | |
tree | aa67caf5816d3d214d0a21b007e2db784e99f12e /src/org/traccar/protocol | |
parent | 9b08cbbca6a35862fbc33e48f5d876899954a17d (diff) | |
download | trackermap-server-2a690606569f042b845da1f61b308698645ad3fc.tar.gz trackermap-server-2a690606569f042b845da1f61b308698645ad3fc.tar.bz2 trackermap-server-2a690606569f042b845da1f61b308698645ad3fc.zip |
Decode OBD odometer value
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/Gl200ProtocolDecoder.java | 4 | ||||
-rw-r--r-- | src/org/traccar/protocol/IntellitracProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/TytanProtocolDecoder.java | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index a7cf1121b..61a0aed39 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -121,7 +121,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { // OBD position.set(Event.KEY_RPM, parser.group(index++)); - position.set(Event.KEY_SPEED, parser.group(index++)); + position.set(Event.KEY_OBD_SPEED, parser.group(index++)); position.set(Event.PREFIX_TEMP + 1, parser.group(index++)); position.set("fuel-consumption", parser.group(index++)); position.set("dtcs-cleared-distance", parser.group(index++)); @@ -130,7 +130,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { position.set("dtcs-codes", parser.group(index++)); position.set("throttle-position", parser.group(index++)); position.set(Event.KEY_FUEL, parser.group(index++)); - position.set("odb-odometer", parser.group(index++)); + position.set(Event.KEY_OBD_ODOMETER, parser.group(index++)); // Validity position.setValid(Integer.valueOf(parser.group(index++)) < 20); diff --git a/src/org/traccar/protocol/IntellitracProtocolDecoder.java b/src/org/traccar/protocol/IntellitracProtocolDecoder.java index a2c16e915..6c8d5bdf9 100644 --- a/src/org/traccar/protocol/IntellitracProtocolDecoder.java +++ b/src/org/traccar/protocol/IntellitracProtocolDecoder.java @@ -122,7 +122,7 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder { position.set(Event.PREFIX_ADC + 2, parser.group(index++)); // J1939 data - position.set(Event.KEY_SPEED, parser.group(index++)); + position.set(Event.KEY_OBD_SPEED, parser.group(index++)); position.set(Event.KEY_RPM, parser.group(index++)); position.set("coolant", parser.group(index++)); position.set(Event.KEY_FUEL, parser.group(index++)); diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java index bcab7ed21..0936732c5 100644 --- a/src/org/traccar/protocol/TytanProtocolDecoder.java +++ b/src/org/traccar/protocol/TytanProtocolDecoder.java @@ -171,7 +171,7 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder { position.set(Event.KEY_POWER, readSwappedFloat(buf)); break; case 101: - position.set(Event.KEY_SPEED, buf.readUnsignedByte()); + position.set(Event.KEY_OBD_SPEED, buf.readUnsignedByte()); break; case 102: position.set(Event.KEY_RPM, buf.readUnsignedByte() * 50); @@ -179,6 +179,9 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder { case 107: position.set(Event.KEY_FUEL, (buf.readUnsignedShort() & 0x3fff) * 0.5); break; + case 108: + position.set(Event.KEY_OBD_ODOMETER, buf.readUnsignedInt() * 5); + break; case 150: position.set("door", buf.readUnsignedByte()); break; |