aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-25 19:50:31 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-25 19:50:31 +1200
commit803e4bb722560054055d989b05f86c76fabfbd2c (patch)
tree0a0ed574718241f4c1c840d594eb37aa37455444 /src/org/traccar
parentde4e6e680777acb9107e7215e993117d3746208d (diff)
downloadtrackermap-server-803e4bb722560054055d989b05f86c76fabfbd2c.tar.gz
trackermap-server-803e4bb722560054055d989b05f86c76fabfbd2c.tar.bz2
trackermap-server-803e4bb722560054055d989b05f86c76fabfbd2c.zip
Decode status in Tytan decoder
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/TytanProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java
index 34b297a83..bfb1e33a3 100644
--- a/src/org/traccar/protocol/TytanProtocolDecoder.java
+++ b/src/org/traccar/protocol/TytanProtocolDecoder.java
@@ -95,7 +95,8 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder {
// Status
flags = buf.readUnsignedByte();
- position.set(Event.KEY_STATUS, flags & 0x1f);
+ position.set(Event.KEY_IGNITION, BitUtil.check(flags, 0));
+ position.set(Event.KEY_GSM, BitUtil.range(flags, 2, 3));
position.setCourse((BitUtil.range(flags, 5) * 45 + 180) % 360);
// Speed