aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/GpsGateProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-09-12 22:58:40 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-09-12 22:58:40 -0700
commite0f15c6a21c188edd61ca78d034aaf1505fb59cb (patch)
tree9d0936d30efabd5959204e54551fad90c7cffc18 /src/main/java/org/traccar/protocol/GpsGateProtocolDecoder.java
parentab70f326d1ea09a20f2b5835d7de9d7ff6a5b220 (diff)
downloadtrackermap-server-e0f15c6a21c188edd61ca78d034aaf1505fb59cb.tar.gz
trackermap-server-e0f15c6a21c188edd61ca78d034aaf1505fb59cb.tar.bz2
trackermap-server-e0f15c6a21c188edd61ca78d034aaf1505fb59cb.zip
Refactor NMEA checksum
Diffstat (limited to 'src/main/java/org/traccar/protocol/GpsGateProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/GpsGateProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/main/java/org/traccar/protocol/GpsGateProtocolDecoder.java
index cc187225b..c158d3212 100644
--- a/src/main/java/org/traccar/protocol/GpsGateProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/GpsGateProtocolDecoder.java
@@ -69,7 +69,8 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder {
private void send(Channel channel, SocketAddress remoteAddress, String message) {
if (channel != null) {
- channel.writeAndFlush(new NetworkMessage(message + Checksum.nmea(message) + "\r\n", remoteAddress));
+ channel.writeAndFlush(new NetworkMessage(
+ message + Checksum.nmea(message.substring(1)) + "\r\n", remoteAddress));
}
}