aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-28 11:47:46 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-28 11:47:46 +1300
commit9b08cbbca6a35862fbc33e48f5d876899954a17d (patch)
treecc8c1e892172742e35482cbc6ae6ca232b43366d /src/org/traccar/protocol
parent063e5399efac99e0e73983d0534f37f052b52e49 (diff)
downloadtrackermap-server-9b08cbbca6a35862fbc33e48f5d876899954a17d.tar.gz
trackermap-server-9b08cbbca6a35862fbc33e48f5d876899954a17d.tar.bz2
trackermap-server-9b08cbbca6a35862fbc33e48f5d876899954a17d.zip
Decode extra Tytan parameters
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/AplicomProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java4
-rw-r--r--src/org/traccar/protocol/IntellitracProtocolDecoder.java4
-rw-r--r--src/org/traccar/protocol/TytanProtocolDecoder.java6
4 files changed, 11 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java
index 490f70e1b..574ff09c3 100644
--- a/src/org/traccar/protocol/AplicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java
@@ -273,7 +273,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
ChannelBuffer value = values.get(i);
switch (buf.readInt()) {
case 0x20D:
- position.set("diesel-rpm", ChannelBuffers.swapShort(value.readShort()));
+ position.set(Event.KEY_RPM, ChannelBuffers.swapShort(value.readShort()));
position.set("diesel-temperature", ChannelBuffers.swapShort(value.readShort()) * 0.1);
position.set("battery-voltage", ChannelBuffers.swapShort(value.readShort()) * 0.01);
position.set("supply-air-temp-dep1", ChannelBuffers.swapShort(value.readShort()) * 0.1);
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index b51851773..a7cf1121b 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -120,8 +120,8 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
position.setDeviceId(getDeviceId());
// OBD
- position.set("engine-rpm", parser.group(index++));
- position.set("obd-speed", parser.group(index++));
+ position.set(Event.KEY_RPM, parser.group(index++));
+ position.set(Event.KEY_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++));
diff --git a/src/org/traccar/protocol/IntellitracProtocolDecoder.java b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
index 25d0914d7..a2c16e915 100644
--- a/src/org/traccar/protocol/IntellitracProtocolDecoder.java
+++ b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
@@ -122,8 +122,8 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
position.set(Event.PREFIX_ADC + 2, parser.group(index++));
// J1939 data
- position.set("vss", parser.group(index++));
- position.set("rpm", parser.group(index++));
+ position.set(Event.KEY_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++));
position.set("consumption", parser.group(index++));
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java
index 04d095a9f..bcab7ed21 100644
--- a/src/org/traccar/protocol/TytanProtocolDecoder.java
+++ b/src/org/traccar/protocol/TytanProtocolDecoder.java
@@ -170,6 +170,12 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder {
case 90:
position.set(Event.KEY_POWER, readSwappedFloat(buf));
break;
+ case 101:
+ position.set(Event.KEY_SPEED, buf.readUnsignedByte());
+ break;
+ case 102:
+ position.set(Event.KEY_RPM, buf.readUnsignedByte() * 50);
+ break;
case 107:
position.set(Event.KEY_FUEL, (buf.readUnsignedShort() & 0x3fff) * 0.5);
break;