aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-03-21 21:13:32 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-03-21 21:13:32 -0700
commitc249e72c20c2046eef91fd602279e11e218159a3 (patch)
tree037a8afbf0c4044c89ce12625dcb7f5cfdeffd33 /src
parent411af91e648433486818f56e713de7278d40cbdb (diff)
downloadtrackermap-server-c249e72c20c2046eef91fd602279e11e218159a3.tar.gz
trackermap-server-c249e72c20c2046eef91fd602279e11e218159a3.tar.bz2
trackermap-server-c249e72c20c2046eef91fd602279e11e218159a3.zip
Decode Box ignition
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/BoxProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/BoxProtocolDecoder.java b/src/org/traccar/protocol/BoxProtocolDecoder.java
index d7b401a2d..3635c29e5 100644
--- a/src/org/traccar/protocol/BoxProtocolDecoder.java
+++ b/src/org/traccar/protocol/BoxProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2014 - 2019 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -94,6 +94,8 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_EVENT, parser.next());
int status = parser.nextInt();
+ position.set(Position.KEY_IGNITION, BitUtil.check(status, 0));
+ position.set(Position.KEY_MOTION, BitUtil.check(status, 1));
position.setValid(!BitUtil.check(status, 2));
position.set(Position.KEY_STATUS, status);