diff options
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java index 8a440e765..963c8646e 100644 --- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java @@ -216,7 +216,10 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_TYPE, type); position.set(Position.KEY_VERSION_FW, values[index++]); - index += 1; // model + int model = Integer.parseInt(values[index++]); + if (model == 41) { + index += 1; // variant + } Network network = new Network(); @@ -249,6 +252,12 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { index += 1; // collaborative network } + if (model == 41) { + index += 1; // collaborative network + index += 1; // temperature + position.set(Position.KEY_MOTION, Integer.parseInt(values[index++]) == 2); + } + if (values[index].isEmpty()) { getLastLocation(position, null); |