aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/PricolProtocolDecoder.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/PricolProtocolDecoder.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/PricolProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/PricolProtocolDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/PricolProtocolDecoder.java b/src/org/traccar/protocol/PricolProtocolDecoder.java
index 3313afa22..6d275d4c0 100644
--- a/src/org/traccar/protocol/PricolProtocolDecoder.java
+++ b/src/org/traccar/protocol/PricolProtocolDecoder.java
@@ -51,11 +51,11 @@ public class PricolProtocolDecoder extends BaseProtocolDecoder {
position.setProtocol(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
- buf.readUnsignedByte(); // event type
- buf.readUnsignedByte(); // packet version
- buf.readUnsignedByte(); // device status
- buf.readUnsignedByte(); // gsm status
- buf.readUnsignedByte(); // gps status
+ position.set("eventType", buf.readUnsignedByte()); // event type
+ position.set("packetVersion", buf.readUnsignedByte()); // packet version
+ position.set(Position.KEY_STATUS, buf.readUnsignedByte()); // device status
+ position.set(Position.KEY_RSSI, buf.readUnsignedByte()); // gsm status
+ position.set(Position.KEY_GPS, buf.readUnsignedByte()); // gps status
position.setTime(new DateBuilder()
.setDateReverse(buf.readUnsignedByte(), buf.readUnsignedByte(), buf.readUnsignedByte())
@@ -76,8 +76,8 @@ public class PricolProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_INPUT, buf.readUnsignedShort());
position.set(Position.KEY_OUTPUT, buf.readUnsignedByte());
- buf.readUnsignedByte(); // analog alerts
- buf.readUnsignedShort(); // custom alert types
+ position.set("analogAlerts", buf.readUnsignedByte()); // analog alerts
+ position.set("customAlertTypes", buf.readUnsignedShort()); // custom alert types
for (int i = 1; i <= 5; i++) {
position.set(Position.PREFIX_ADC + i, buf.readUnsignedShort());