diff options
Diffstat (limited to 'src/org/traccar/protocol/MxtProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/MxtProtocolDecoder.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/MxtProtocolDecoder.java b/src/org/traccar/protocol/MxtProtocolDecoder.java index 194e0fb71..9f7207bc4 100644 --- a/src/org/traccar/protocol/MxtProtocolDecoder.java +++ b/src/org/traccar/protocol/MxtProtocolDecoder.java @@ -16,7 +16,7 @@ package org.traccar.protocol; import java.net.SocketAddress; -import java.util.Calendar; +import java.util.Calendar; import java.util.Date; import java.util.TimeZone; import org.jboss.netty.buffer.ChannelBuffer; @@ -101,15 +101,15 @@ public class MxtProtocolDecoder extends BaseProtocolDecoder { position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte())); int inputMask = buf.readUnsignedByte(); - + if (BitUtil.check(infoGroups, 0)) { buf.skipBytes(8); // waypoints } - + if (BitUtil.check(infoGroups, 1)) { buf.skipBytes(8); // wireless accessory } - + if (BitUtil.check(infoGroups, 2)) { position.set(Event.KEY_SATELLITES, buf.readUnsignedByte()); position.set(Event.KEY_HDOP, buf.readUnsignedByte()); @@ -119,24 +119,24 @@ public class MxtProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedByte(); // input voltage position.set(Event.PREFIX_TEMP + 1, buf.readByte()); } - + if (BitUtil.check(infoGroups, 3)) { position.set(Event.KEY_ODOMETER, buf.readUnsignedInt()); } - + if (BitUtil.check(infoGroups, 4)) { position.set("hours", buf.readUnsignedInt()); } - + if (BitUtil.check(infoGroups, 5)) { buf.readUnsignedInt(); // reason } - + if (BitUtil.check(infoGroups, 6)) { position.set(Event.KEY_POWER, buf.readUnsignedShort() * 0.001); position.set(Event.KEY_BATTERY, buf.readUnsignedShort()); } - + if (BitUtil.check(infoGroups, 7)) { position.set(Event.KEY_RFID, buf.readUnsignedInt()); } |