aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2023-01-18 15:18:44 -0800
committerGitHub <noreply@github.com>2023-01-18 15:18:44 -0800
commit4d2a7b04f3c0a095e264d3a9274cdb221dec0912 (patch)
treeaaa8a14de7353d3c509bb476dcc0c132b7f30892 /src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java
parent9ff9bd75fff98cc46395bfa870ba0c1f7ab34d87 (diff)
parent9a664ae1fc6b564a5b6ddf4923ab3fd54fa23aa3 (diff)
downloadtrackermap-server-4d2a7b04f3c0a095e264d3a9274cdb221dec0912.tar.gz
trackermap-server-4d2a7b04f3c0a095e264d3a9274cdb221dec0912.tar.bz2
trackermap-server-4d2a7b04f3c0a095e264d3a9274cdb221dec0912.zip
Merge pull request #5019 from casswarry0/develop
Add additional status codes to eeLink protocol
Diffstat (limited to 'src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java b/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java
index f6b5720da..cb0e10042 100644
--- a/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -273,6 +273,17 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
if (BitUtil.check(status, 1)) {
position.set(Position.KEY_IGNITION, BitUtil.check(status, 2));
}
+ if (BitUtil.check(status, 3)) {
+ position.set(Position.KEY_ARMED, BitUtil.check(status, 4));
+ position.set(Position.KEY_MOTION, BitUtil.check(status, 9));
+ }
+ if (BitUtil.check(status, 5)) {
+ position.set(Position.KEY_BLOCKED, BitUtil.check(status, 6));
+ }
+ if (BitUtil.check(status, 7)) {
+ position.set(Position.KEY_CHARGE, BitUtil.check(status, 8));
+ }
+ position.set(Position.KEY_GPS, BitUtil.check(status, 10));
position.set(Position.KEY_STATUS, status);
}