From e0fd68f63da84b9484514ace9f0fc70a877d7062 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 31 Aug 2018 15:49:56 +1200 Subject: Fix Suntech ST410 cell decoding --- src/org/traccar/protocol/SuntechProtocolDecoder.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/protocol') 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)); -- cgit v1.2.3