aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
index 0c72568f3..4abb75025 100644
--- a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
@@ -152,7 +152,7 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder {
if (responseCode != null) {
String response = "$AVCFG," + devicePassword + "," + responseCode;
- response += Checksum.nmea(response) + "\r\n";
+ response += Checksum.nmea(response.substring(1)) + "\r\n";
channel.writeAndFlush(new NetworkMessage(response, remoteAddress));
}
@@ -163,7 +163,7 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder {
if (Character.isLowerCase(status.charAt(0))) {
String response = "$EAVACK," + event + "," + checksum;
- response += Checksum.nmea(response) + "\r\n";
+ response += Checksum.nmea(response.substring(1)) + "\r\n";
channel.writeAndFlush(new NetworkMessage(response, remoteAddress));
}