diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-08-31 15:49:56 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-08-31 15:49:56 +1200 |
commit | e0fd68f63da84b9484514ace9f0fc70a877d7062 (patch) | |
tree | 1d8ae2753fcf6c684df3998b8d3dc167b8b35bd2 | |
parent | 569fb5c36eb4b8b36196114bdeb64030b1516e48 (diff) | |
download | trackermap-server-e0fd68f63da84b9484514ace9f0fc70a877d7062.tar.gz trackermap-server-e0fd68f63da84b9484514ace9f0fc70a877d7062.tar.bz2 trackermap-server-e0fd68f63da84b9484514ace9f0fc70a877d7062.zip |
Fix Suntech ST410 cell decoding
-rw-r--r-- | src/org/traccar/protocol/SuntechProtocolDecoder.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/SuntechProtocolDecoder.java b/src/org/traccar/protocol/SuntechProtocolDecoder.java index 5166240d0..eed269270 100644 --- a/src/org/traccar/protocol/SuntechProtocolDecoder.java +++ b/src/org/traccar/protocol/SuntechProtocolDecoder.java @@ -185,8 +185,14 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { int cid = Integer.parseInt(values[index++]); int mcc = Integer.parseInt(values[index++]); int mnc = Integer.parseInt(values[index++]); - int rssi = Integer.parseInt(values[index++]); - int lac = Integer.parseInt(values[index++]); + int lac, rssi; + if (i == 0) { + rssi = Integer.parseInt(values[index++]); + lac = Integer.parseInt(values[index++]); + } else { + lac = Integer.parseInt(values[index++]); + rssi = Integer.parseInt(values[index++]); + } index += 1; // timing advance if (cid > 0) { network.addCellTower(CellTower.from(mcc, mnc, lac, cid, rssi)); |