aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Gl200TextProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gl200TextProtocolDecoder.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
index fb0023dba..d7468e71d 100644
--- a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
@@ -575,10 +575,8 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
if (BitUtil.check(reportMask, 9)) {
index += 1; // range
}
- if (BitUtil.check(reportMask, 10)) {
- if (!values[index++].isEmpty()) {
- position.set(Position.KEY_THROTTLE, Integer.parseInt(values[index - 1]));
- }
+ if (BitUtil.check(reportMask, 10) && !values[index++].isEmpty()) {
+ position.set(Position.KEY_THROTTLE, Integer.parseInt(values[index - 1]));
}
if (BitUtil.check(reportMask, 11)) {
position.set(Position.KEY_HOURS, Double.parseDouble(values[index++]));