aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/PiligrimProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/PiligrimProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/PiligrimProtocolDecoder.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/PiligrimProtocolDecoder.java b/src/org/traccar/protocol/PiligrimProtocolDecoder.java
index f4eafd833..30b81f5fb 100644
--- a/src/org/traccar/protocol/PiligrimProtocolDecoder.java
+++ b/src/org/traccar/protocol/PiligrimProtocolDecoder.java
@@ -34,6 +34,7 @@ import org.jboss.netty.handler.codec.http.HttpVersion;
import org.jboss.netty.handler.codec.http.QueryStringDecoder;
import org.traccar.BaseProtocolDecoder;
+import org.traccar.model.Event;
import org.traccar.model.Position;
public class PiligrimProtocolDecoder extends BaseProtocolDecoder {
@@ -133,7 +134,7 @@ public class PiligrimProtocolDecoder extends BaseProtocolDecoder {
// Satellites
int satellites = buf.readUnsignedByte();
- position.set("satellites", satellites);
+ position.set(Event.KEY_SATELLITES, satellites);
position.setValid(satellites >= 3);
// Speed
@@ -151,12 +152,12 @@ public class PiligrimProtocolDecoder extends BaseProtocolDecoder {
// External power
double power = buf.readUnsignedByte();
power += buf.readUnsignedByte() << 8;
- position.set("power", power / 100);
+ position.set(Event.KEY_POWER, power / 100);
// Battery
double battery = buf.readUnsignedByte();
battery += buf.readUnsignedByte() << 8;
- position.set("battery", battery / 100);
+ position.set(Event.KEY_BATTERY, battery / 100);
buf.skipBytes(6);