aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-27 07:33:28 -0700
committerAnton Tananaev <anton@traccar.org>2023-03-27 07:33:28 -0700
commita5a2a3f69fd76602f5577354cde653915e8d8ad4 (patch)
tree757a2d3a9918b82aa57d94b3ab77b92d786360f1 /src
parentac60477392048413d97a6d54a4456647aaaf7d22 (diff)
downloadtrackermap-server-a5a2a3f69fd76602f5577354cde653915e8d8ad4.tar.gz
trackermap-server-a5a2a3f69fd76602f5577354cde653915e8d8ad4.tar.bz2
trackermap-server-a5a2a3f69fd76602f5577354cde653915e8d8ad4.zip
Fix VLT type decoding
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/VltProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/VltProtocolDecoder.java b/src/main/java/org/traccar/protocol/VltProtocolDecoder.java
index 8890dece1..01c0563f5 100644
--- a/src/main/java/org/traccar/protocol/VltProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/VltProtocolDecoder.java
@@ -124,13 +124,15 @@ public class VltProtocolDecoder extends BaseHttpProtocolDecoder {
switch (type) {
case "NRM":
return decodePosition(deviceSession, sentence.substring(3 + 15));
- default:
+ case "BTH":
List<Position> positions = new LinkedList<>();
int count = Integer.parseInt(sentence.substring(index, index += 3));
for (int i = 0; i < count; i++) {
positions.add(decodePosition(deviceSession, sentence.substring(index, index += 78)));
}
return positions;
+ default:
+ return null;
}
}