diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index ce915fde8..57e2d64b7 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -277,7 +277,19 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { if (type == MSG_INFO) { int subType = buf.readUnsignedByte(); - if (subType == 0x05) { + if (subType == 0x00) { + + Position position = new Position(); + position.setDeviceId(getDeviceId()); + position.setProtocol(getProtocolName()); + + getLastLocation(position, null); + + position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01); + + return position; + + } else if (subType == 0x05) { Position position = new Position(); position.setDeviceId(getDeviceId()); |