aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/TytanProtocolDecoder.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java
index 6ccce4423..5e48c2813 100644
--- a/src/org/traccar/protocol/TytanProtocolDecoder.java
+++ b/src/org/traccar/protocol/TytanProtocolDecoder.java
@@ -82,8 +82,10 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder {
lon = lon * 360 / 16777216 - 180;
position.setLongitude(lon);
- // Course
- int course = (buf.readUnsignedByte() >> 5) * 45;
+ // Status
+ flags = buf.readUnsignedByte();
+ position.set(Event.KEY_STATUS, flags & 0x1f);
+ int course = (flags >> 5) * 45;
course = (course + 180) % 360;
position.setCourse(course);