aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Jt600ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-15 18:07:03 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-15 18:07:03 +1300
commit3ba58a7d025c33c5f4e5e2d595158ecf9f420008 (patch)
tree34bc7f52059822cbc27e6eac7d3c204fa267f881 /src/org/traccar/protocol/Jt600ProtocolDecoder.java
parentde46b77e923d3412d74dbf745933bd62acaeca77 (diff)
downloadtrackermap-server-3ba58a7d025c33c5f4e5e2d595158ecf9f420008.tar.gz
trackermap-server-3ba58a7d025c33c5f4e5e2d595158ecf9f420008.tar.bz2
trackermap-server-3ba58a7d025c33c5f4e5e2d595158ecf9f420008.zip
Store LAC and CID in right format
Diffstat (limited to 'src/org/traccar/protocol/Jt600ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Jt600ProtocolDecoder.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
index d9e31fe48..b576b063d 100644
--- a/src/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -94,8 +94,13 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
position.setAltitude(buf.readUnsignedShort());
- position.set(Event.KEY_CID, buf.readUnsignedShort());
- position.set(Event.KEY_LAC, buf.readUnsignedShort());
+ int cid = buf.readUnsignedShort();
+ int lac = buf.readUnsignedShort();
+ if (cid != 0 && lac != 0) {
+ position.set(Event.KEY_CID, cid);
+ position.set(Event.KEY_LAC, lac);
+ }
+
position.set(Event.KEY_GSM, buf.readUnsignedByte());
} else if (version == 2) {