aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
index bee21982e..0e829e7f7 100644
--- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
@@ -461,9 +461,11 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
position.set(Position.KEY_TYPE, type);
- int mask = Integer.parseInt(values[index++], 16);
+ int mask;
if (type.equals("BLE")) {
mask = 0b1100000110110;
+ } else {
+ mask = Integer.parseInt(values[index++], 16);
}
if (BitUtil.check(mask, 1)) {
@@ -518,7 +520,6 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
position.setValid(true);
int count = Integer.parseInt(values[index++]);
- index += 1;
for (int i = 1; i <= count; i++) {
position.set("tag" + i + "Rssi", Integer.parseInt(values[index++]));