aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/SkypatrolProtocolDecoder.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/SkypatrolProtocolDecoder.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/SkypatrolProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/SkypatrolProtocolDecoder.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
index dfe87caf5..915426f15 100644
--- a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
+++ b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
@@ -92,15 +92,15 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
if (BitUtil.check(mask, 3)) {
- buf.readUnsignedShort(); // io data
+ position.set(Position.PREFIX_IO + 1, buf.readUnsignedShort()); // io data
}
if (BitUtil.check(mask, 4)) {
- buf.readUnsignedShort(); // adc 1
+ position.set(Position.PREFIX_ADC + 1, buf.readUnsignedShort()); // adc 1
}
if (BitUtil.check(mask, 5)) {
- buf.readUnsignedShort(); // adc 2
+ position.set(Position.PREFIX_ADC + 2, buf.readUnsignedShort()); // adc 2
}
if (BitUtil.check(mask, 7)) {
@@ -150,11 +150,11 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
}
if (BitUtil.check(mask, 17)) {
- buf.readUnsignedShort(); // battery percentage
+ position.set(Position.KEY_BATTERY, buf.readUnsignedShort()); // battery percentage
}
if (BitUtil.check(mask, 20)) {
- position.set("trip", buf.readUnsignedInt());
+ position.set(Position.KEY_TRIP_ODOMETER, buf.readUnsignedInt());
}
if (BitUtil.check(mask, 21)) {