aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-11-22 06:38:04 -0800
committerAnton Tananaev <anton@traccar.org>2023-11-22 06:38:10 -0800
commitb611af130271182c8e9de924a33f172ee4431a93 (patch)
tree8e6be050dd0fc4cc2b57a41b7671800b818d06a0 /src/main/java/org
parent12aac4e3a7bc78943f8d6c3b51a692210b0cf06f (diff)
downloadtrackermap-server-b611af130271182c8e9de924a33f172ee4431a93.tar.gz
trackermap-server-b611af130271182c8e9de924a33f172ee4431a93.tar.bz2
trackermap-server-b611af130271182c8e9de924a33f172ee4431a93.zip
Fix Mictrack MT710 wifi decoding
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
index 5ba053df3..2e7cdde4e 100644
--- a/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
@@ -210,7 +210,9 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
parser = new Parser(PATTERN_WIFI, message);
if (parser.matches()) {
- position.set(Position.KEY_BATTERY, parser.nextInt() * 0.1);
+ if (parser.hasNext()) {
+ position.set(Position.KEY_BATTERY, parser.nextInt() * 0.1);
+ }
Network network = new Network();
if (parser.hasNext(4)) {