diff options
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/UlbotechProtocolDecoder.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/UlbotechProtocolDecoder.java b/src/org/traccar/protocol/UlbotechProtocolDecoder.java index 8a9df5992..9c08264b5 100644 --- a/src/org/traccar/protocol/UlbotechProtocolDecoder.java +++ b/src/org/traccar/protocol/UlbotechProtocolDecoder.java @@ -21,6 +21,7 @@ import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.Context; +import org.traccar.helper.BitUtil; import org.traccar.helper.ChannelBufferTools; import org.traccar.helper.UnitsConverter; import org.traccar.model.Event; @@ -94,6 +95,13 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder { position.set(Event.KEY_HDOP, buf.readUnsignedShort()); break; + case DATA_STATUS: + int status = buf.readUnsignedShort(); + position.set(Event.KEY_IGNITION, BitUtil.check(status, 6)); + + buf.readUnsignedShort(); // alarm + break; + default: buf.skipBytes(length); break; |