aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/PricolProtocolDecoder.java
diff options
context:
space:
mode:
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());