diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-24 12:20:24 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-24 12:20:24 +1200 |
commit | a3f912fc98ce333045ed72c1942412505b039a20 (patch) | |
tree | c19a0925237efd05e647168b791cf359787ef9e1 /src/org/traccar | |
parent | 9b7c0f367218e69b14a77bcdbdd58d524b4e78d2 (diff) | |
download | trackermap-server-a3f912fc98ce333045ed72c1942412505b039a20.tar.gz trackermap-server-a3f912fc98ce333045ed72c1942412505b039a20.tar.bz2 trackermap-server-a3f912fc98ce333045ed72c1942412505b039a20.zip |
Decode ignition status for Ulbotech
Diffstat (limited to 'src/org/traccar')
-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; |