From 779486a30483f7ab9c2c0f4c39c6a4e14319b330 Mon Sep 17 00:00:00 2001 From: Edward Valley Date: Sun, 9 Jul 2023 17:07:35 -0400 Subject: Fix more errors --- src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java index f0753cb5c..de039a2fd 100644 --- a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java @@ -231,6 +231,9 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder { if (device != null) { deviceModel = device.getModel(); } + if (deviceModel == null) { + deviceModel = ""; + } Position position = new Position(getProtocolName()); @@ -261,6 +264,8 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder { if ("AVL110".equals(deviceModel) || "AVL120".equals(deviceModel)) { position.set(Position.PREFIX_ADC + 2, parser.nextDouble() * 0.001); + } else { + parser.next(); } Integer lac = parser.nextHexInt(); -- cgit v1.2.3