aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CellocatorProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/CellocatorProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/CellocatorProtocolDecoder.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/org/traccar/protocol/CellocatorProtocolDecoder.java b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
index ce43cce37..2b4fa9fb6 100644
--- a/src/org/traccar/protocol/CellocatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
@@ -109,9 +109,9 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder {
}
position.setDeviceId(deviceSession.getDeviceId());
- position.set(Position.KEY_VERSION_HW, buf.readUnsignedByte()); // hardware version
- position.set(Position.KEY_VERSION_FW, buf.readUnsignedByte()); // software version
- position.set("protocolVersion", buf.readUnsignedByte()); // protocol version
+ position.set(Position.KEY_VERSION_HW, buf.readUnsignedByte());
+ position.set(Position.KEY_VERSION_FW, buf.readUnsignedByte());
+ position.set("protocolVersion", buf.readUnsignedByte());
position.set(Position.KEY_STATUS, buf.getUnsignedByte(buf.readerIndex()) & 0x0f);
@@ -121,21 +121,21 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // reason data
position.set(Position.KEY_ALARM, decodeAlarm(buf.readUnsignedByte()));
- position.set("mode", buf.readUnsignedByte()); // mode
- position.set(Position.PREFIX_IO + 1, buf.readUnsignedInt()); // IO
+ position.set("mode", buf.readUnsignedByte());
+ position.set(Position.PREFIX_IO + 1, buf.readUnsignedInt());
operator <<= 8;
operator += buf.readUnsignedByte();
position.set(Position.KEY_OPERATOR, operator);
- position.set(Position.PREFIX_ADC + 1, buf.readUnsignedInt()); // ADC
- position.set(Position.KEY_ODOMETER, buf.readUnsignedMedium()); // Odometer
+ position.set(Position.PREFIX_ADC + 1, buf.readUnsignedInt());
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedMedium());
buf.skipBytes(6); // multi-purpose data
- position.set(Position.KEY_GPS, buf.readUnsignedShort()); // gps fix
- position.set("locationStatus", buf.readUnsignedByte()); // location status
- position.set("mode1", buf.readUnsignedByte()); // mode 1
- position.set("mode2", buf.readUnsignedByte()); // mode 2
+ position.set(Position.KEY_GPS, buf.readUnsignedShort());
+ position.set("locationStatus", buf.readUnsignedByte());
+ position.set("mode1", buf.readUnsignedByte());
+ position.set("mode2", buf.readUnsignedByte());
position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());