aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-09-17 17:00:48 -0700
committerAnton Tananaev <anton@traccar.org>2022-09-17 17:00:48 -0700
commit2d36cb5e0bbad23064d75f1f9364094b3e2fefa5 (patch)
treeb5e9bd046ba011322942af6d1a2a243d44ca7a3e /src
parent3a6219d8cc2a014a78d53f9ca9695558ffd72926 (diff)
downloadtrackermap-server-2d36cb5e0bbad23064d75f1f9364094b3e2fefa5.tar.gz
trackermap-server-2d36cb5e0bbad23064d75f1f9364094b3e2fefa5.tar.bz2
trackermap-server-2d36cb5e0bbad23064d75f1f9364094b3e2fefa5.zip
Some Navis improvements
Diffstat (limited to 'src')
-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()));
}
}