aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
index 04113c51e..197e93602 100644
--- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
@@ -304,7 +304,7 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_POWER, Double.parseDouble(values[index++]));
String io = values[index++];
- if (io.length() == 6) {
+ if (io.length() >= 6) {
position.set(Position.KEY_IGNITION, io.charAt(0) == '1');
position.set(Position.PREFIX_IN + 1, io.charAt(1) == '1');
position.set(Position.PREFIX_IN + 2, io.charAt(2) == '1');