aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Mta6ProtocolDecoder.java
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-02-25 20:50:12 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-03-04 15:57:37 -0500
commit96ad8262428107025ff3f5cde165cc53117acca4 (patch)
tree2a89e5c3036b7f419a8125e0328186f15ecfdb39 /src/org/traccar/protocol/Mta6ProtocolDecoder.java
parent44a6a0ac96d4925eb0c29bcbcd1807d9176dfa04 (diff)
downloadtrackermap-server-96ad8262428107025ff3f5cde165cc53117acca4.tar.gz
trackermap-server-96ad8262428107025ff3f5cde165cc53117acca4.tar.bz2
trackermap-server-96ad8262428107025ff3f5cde165cc53117acca4.zip
Updated protocols to record additional information as reported in comments and confirmed in available documentation;
Diffstat (limited to 'src/org/traccar/protocol/Mta6ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Mta6ProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
index 2a3d84a2c..f8a316931 100644
--- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
@@ -182,7 +182,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
if (BitUtil.check(flags, 7)) {
position.set(Position.KEY_BATTERY, buf.getUnsignedByte(buf.readerIndex()) >> 2);
position.set(Position.KEY_POWER, buf.readUnsignedShort() & 0x03ff);
- buf.readByte(); // microcontroller temperature
+ position.set("microcontrollerTemperature", buf.readByte()); // microcontroller temperature
position.set(Position.KEY_RSSI, (buf.getUnsignedByte(buf.readerIndex()) >> 4) & 0x07);
@@ -222,7 +222,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(new FloatReader().readFloat(buf) / Math.PI * 180);
position.setTime(new TimeReader().readTime(buf));
- buf.readUnsignedByte(); // status
+ position.set(Position.KEY_STATUS, buf.readUnsignedByte()); // status
if (BitUtil.check(flags, 0)) {
position.setAltitude(buf.readUnsignedShort());
@@ -241,7 +241,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
position.set("engine", buf.readUnsignedShort() * 0.125);
position.set("pedals", buf.readUnsignedByte());
position.set(Position.PREFIX_TEMP + 1, buf.readUnsignedByte() - 40);
- buf.readUnsignedShort(); // service odometer
+ position.set("serviceOdometer", buf.readUnsignedShort()); // service odometer
}
if (BitUtil.check(flags, 3)) {
@@ -261,7 +261,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
if (BitUtil.check(flags, 5)) {
position.set(Position.KEY_BATTERY, buf.getUnsignedByte(buf.readerIndex()) >> 2);
position.set(Position.KEY_POWER, buf.readUnsignedShort() & 0x03ff);
- buf.readByte(); // microcontroller temperature
+ position.set("microcontrollerTemperature", buf.readByte()); // microcontroller temperature
position.set(Position.KEY_RSSI, buf.getUnsignedByte(buf.readerIndex()) >> 5);