diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-12-31 10:10:08 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-12-31 10:10:08 -0800 |
commit | ff6a7b59b84dbb648f35e08f013f8852060e321d (patch) | |
tree | 108f907135111486ed498a9c168e6598105fe577 /src/org | |
parent | 969ab169322f8a20f5c87b37eb3651914e4c5102 (diff) | |
download | trackermap-server-ff6a7b59b84dbb648f35e08f013f8852060e321d.tar.gz trackermap-server-ff6a7b59b84dbb648f35e08f013f8852060e321d.tar.bz2 trackermap-server-ff6a7b59b84dbb648f35e08f013f8852060e321d.zip |
Handle Queclink GTSTC messages (fix #4173)
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/Gl200TextProtocolDecoder.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java index 97cc8f987..31ff4a670 100644 --- a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java @@ -1079,9 +1079,11 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { return null; } - int hdop = parser.nextInt(); - position.setValid(hdop > 0); - position.set(Position.KEY_HDOP, hdop); + if (parser.hasNext()) { + int hdop = parser.nextInt(); + position.setValid(hdop > 0); + position.set(Position.KEY_HDOP, hdop); + } position.setSpeed(UnitsConverter.knotsFromKph(parser.nextDouble(0))); position.setCourse(parser.nextDouble(0)); |