diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-11-06 22:55:15 -0800 |
---|---|---|
committer | Ryan Neuharth <neuharthr@gmail.com> | 2019-11-09 11:50:07 -0600 |
commit | a632ac3daaca8389e380c4c862765f46b88f1fb9 (patch) | |
tree | 4045fbc231ae95218b149dcb8710de0f57700a41 /src/main/java/org/traccar/protocol | |
parent | 56cf856e0d08b32d7b637b066e0f735209d86e21 (diff) | |
download | trackermap-server-a632ac3daaca8389e380c4c862765f46b88f1fb9.tar.gz trackermap-server-a632ac3daaca8389e380c4c862765f46b88f1fb9.tar.bz2 trackermap-server-a632ac3daaca8389e380c4c862765f46b88f1fb9.zip |
Updated OpenCellId geolocation to utilize the URL parameter from the
configuration file in order to allow for changes to the end point. If
not set, default URL is used for backwards compatibility.
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java index e1ff0b6b6..07da70bf7 100644 --- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -548,6 +548,15 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.01); position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01); + long portInfo = buf.readUnsignedInt(); + + position.set(Position.KEY_INPUT, buf.readUnsignedByte()); + position.set(Position.KEY_OUTPUT, buf.readUnsignedByte()); + + for (int i = 1; i <= BitUtil.between(portInfo, 20, 24); i++) { + position.set(Position.PREFIX_ADC + i, buf.readUnsignedShort() * 0.01); + } + return position; } else if (type == MSG_X1_PHOTO_INFO) { |