diff options
Diffstat (limited to 'src')
-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)); |