aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gt06ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-15 13:49:57 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-15 13:49:57 +1200
commitdc3559a9cc49206e87f26349b8f8a41398f299b5 (patch)
treedb065051c3899127d2e41aa1456f0e0f8d52ac41 /src/org/traccar/protocol/Gt06ProtocolDecoder.java
parent1d884d5660b827964e10d4dc95d95ee6838e0aca (diff)
downloadtrackermap-server-dc3559a9cc49206e87f26349b8f8a41398f299b5.tar.gz
trackermap-server-dc3559a9cc49206e87f26349b8f8a41398f299b5.tar.bz2
trackermap-server-dc3559a9cc49206e87f26349b8f8a41398f299b5.zip
Decode alternative GT06 info message
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index e3be8d5ab..9570eac96 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -516,6 +516,17 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
return decodeWifi(buf, deviceSession);
+ } else if (type == MSG_INFO) {
+
+ Position position = new Position(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ getLastLocation(position, null);
+
+ position.set(Position.KEY_POWER, buf.readShort() * 0.01);
+
+ return position;
+
} else {
return decodeBasicOther(channel, buf, deviceSession, type, dataLength);