diff options
Diffstat (limited to 'src/org/traccar/protocol/Mta6ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Mta6ProtocolDecoder.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java index 2a3d84a2c..0fda94eef 100644 --- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java +++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java @@ -182,7 +182,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { if (BitUtil.check(flags, 7)) { position.set(Position.KEY_BATTERY, buf.getUnsignedByte(buf.readerIndex()) >> 2); position.set(Position.KEY_POWER, buf.readUnsignedShort() & 0x03ff); - buf.readByte(); // microcontroller temperature + position.set(Position.KEY_DEVICE_TEMP, buf.readByte()); position.set(Position.KEY_RSSI, (buf.getUnsignedByte(buf.readerIndex()) >> 4) & 0x07); @@ -222,7 +222,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { position.setLongitude(new FloatReader().readFloat(buf) / Math.PI * 180); position.setTime(new TimeReader().readTime(buf)); - buf.readUnsignedByte(); // status + position.set(Position.KEY_STATUS, buf.readUnsignedByte()); if (BitUtil.check(flags, 0)) { position.setAltitude(buf.readUnsignedShort()); @@ -233,7 +233,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { if (BitUtil.check(flags, 1)) { position.set(Position.KEY_FUEL_CONSUMPTION, new FloatReader().readFloat(buf)); - position.set("hours", new FloatReader().readFloat(buf)); + position.set(Position.KEY_HOURS, new FloatReader().readFloat(buf)); position.set("tank", buf.readUnsignedByte() * 0.4); } @@ -241,11 +241,11 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { position.set("engine", buf.readUnsignedShort() * 0.125); position.set("pedals", buf.readUnsignedByte()); position.set(Position.PREFIX_TEMP + 1, buf.readUnsignedByte() - 40); - buf.readUnsignedShort(); // service odometer + position.set(Position.KEY_ODOMETER_SERVICE, buf.readUnsignedShort()); } if (BitUtil.check(flags, 3)) { - position.set(Position.KEY_FUEL, buf.readUnsignedShort()); + position.set(Position.KEY_FUEL_LEVEL, buf.readUnsignedShort()); position.set(Position.PREFIX_ADC + 2, buf.readUnsignedShort()); position.set(Position.PREFIX_ADC + 3, buf.readUnsignedShort()); position.set(Position.PREFIX_ADC + 4, buf.readUnsignedShort()); @@ -261,7 +261,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder { if (BitUtil.check(flags, 5)) { position.set(Position.KEY_BATTERY, buf.getUnsignedByte(buf.readerIndex()) >> 2); position.set(Position.KEY_POWER, buf.readUnsignedShort() & 0x03ff); - buf.readByte(); // microcontroller temperature + position.set(Position.KEY_DEVICE_TEMP, buf.readByte()); position.set(Position.KEY_RSSI, buf.getUnsignedByte(buf.readerIndex()) >> 5); |