aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-03-13 01:00:09 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-03-13 01:00:09 +1300
commit612547f1b0cae5e0ba39359ed349799f2a87ca2f (patch)
tree0714fcfa5b72a853ff994d348863a0f3c0e56e4c /src/org/traccar/protocol
parent708c38728c8c250ba7205cd7fd77182895d1ea07 (diff)
downloadtrackermap-server-612547f1b0cae5e0ba39359ed349799f2a87ca2f.tar.gz
trackermap-server-612547f1b0cae5e0ba39359ed349799f2a87ca2f.tar.bz2
trackermap-server-612547f1b0cae5e0ba39359ed349799f2a87ca2f.zip
Handle missing temperature (fix #3806)
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/Gl200TextProtocolDecoder.java4
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);
+ }
}
}