diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/Gl200TextProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java index 362fc38c7..ff300d429 100644 --- a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java @@ -787,7 +787,9 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { for (int i = 1; i <= deviceCount; i++) { index += 1; // id index += 1; // type - position.set(Position.PREFIX_TEMP + i, (short) Integer.parseInt(data[index++], 16) * 0.0625); + if (!data[index++].isEmpty()) { + position.set(Position.PREFIX_TEMP + i, (short) Integer.parseInt(data[index - 1], 16) * 0.0625); + } } } |