aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/NavisProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-09-18 10:09:02 -0700
committerGitHub <noreply@github.com>2022-09-18 10:09:02 -0700
commitd702c9caf113ca761c57f811b128f8188c9dec0c (patch)
tree8891e32d889f68ccbb294585bc0ff89875583567 /src/main/java/org/traccar/protocol/NavisProtocolDecoder.java
parentd4513fa86539577e24ede46d40748d8d034b025c (diff)
parent4de8efe1ef0810af492c161bfc1d3200958d75d8 (diff)
downloadtrackermap-server-d702c9caf113ca761c57f811b128f8188c9dec0c.tar.gz
trackermap-server-d702c9caf113ca761c57f811b128f8188c9dec0c.tar.bz2
trackermap-server-d702c9caf113ca761c57f811b128f8188c9dec0c.zip
Merge branch 'master' into ndtpv6-dev
Diffstat (limited to 'src/main/java/org/traccar/protocol/NavisProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/NavisProtocolDecoder.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/protocol/NavisProtocolDecoder.java b/src/main/java/org/traccar/protocol/NavisProtocolDecoder.java
index 53631bd4e..77158b315 100644
--- a/src/main/java/org/traccar/protocol/NavisProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/NavisProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2022 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import org.traccar.NetworkMessage;
import org.traccar.Protocol;
import org.traccar.helper.BitUtil;
import org.traccar.helper.Checksum;
-import org.traccar.helper.Checksum.Algorithm;
import org.traccar.helper.DateBuilder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
@@ -591,10 +590,8 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder {
private void sendFlexReply(Channel channel, ByteBuf data) {
if (channel != null) {
- ByteBuf cs = Unpooled.buffer(1);
- cs.writeByte(Checksum.crc8(new Algorithm(8, 0x31, 0xFF, false, false, 0x00), data.nioBuffer()));
-
- channel.writeAndFlush(new NetworkMessage(Unpooled.wrappedBuffer(data, cs), channel.remoteAddress()));
+ data.writeByte(Checksum.crc8(Checksum.CRC8_EGTS, data.nioBuffer()));
+ channel.writeAndFlush(new NetworkMessage(data, channel.remoteAddress()));
}
}