aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorcasswarry0 <casswarry0@gmail.com>2021-11-23 20:09:32 -0700
committercasswarry0 <casswarry0@gmail.com>2021-11-23 20:09:32 -0700
commit45bbb7a78a1312eb42e331e22478874d13e7a505 (patch)
tree8ae9bcf1a61f193871f2c1688c50ff4a3f921ac6 /src/main/java/org/traccar
parent17370d68fe7383226d1d23a967985e9da4153601 (diff)
downloadtrackermap-server-45bbb7a78a1312eb42e331e22478874d13e7a505.tar.gz
trackermap-server-45bbb7a78a1312eb42e331e22478874d13e7a505.tar.bz2
trackermap-server-45bbb7a78a1312eb42e331e22478874d13e7a505.zip
Add additional status codes to eeLink protocol
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java b/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java
index 8fe12fe69..068b19cbc 100644
--- a/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -232,9 +232,20 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
int status = buf.readUnsignedShort();
position.setValid(BitUtil.check(status, 0));
- if (BitUtil.check(status, 1)) {
+ if (BitUtil.check(status, 1)) { // designed for car
position.set(Position.KEY_IGNITION, BitUtil.check(status, 2));
}
+ if (BitUtil.check(status, 3)) { // accelerometer supported
+ position.set(Position.KEY_ARMED, BitUtil.check(status, 4));
+ position.set(Position.KEY_MOTION, BitUtil.check(status, 9));
+ }
+ if (BitUtil.check(status, 5)) { // relay control supported
+ position.set(Position.KEY_BLOCKED, BitUtil.check(status, 6));
+ }
+ if (BitUtil.check(status, 7)) { // external charging supported
+ position.set(Position.KEY_CHARGE, BitUtil.check(status, 8));
+ }
+ position.set(Position.KEY_GPS, BitUtil.check(status, 10));
position.set(Position.KEY_STATUS, status);
}