aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-07-06 16:52:23 +0500
committerAbyss777 <abyss@fox5.ru>2016-07-06 16:52:23 +0500
commitf8f21ce131556ca5c1ea44ede496ace9d810c844 (patch)
tree7a54b2fb6eed19341afd72298909276b33a059da /src/org
parent801f9e25448be8a3b27c3b56798525b2fff27633 (diff)
downloadtraccar-server-f8f21ce131556ca5c1ea44ede496ace9d810c844.tar.gz
traccar-server-f8f21ce131556ca5c1ea44ede496ace9d810c844.tar.bz2
traccar-server-f8f21ce131556ca5c1ea44ede496ace9d810c844.zip
More optimizations
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/GranitProtocol.java2
-rw-r--r--src/org/traccar/protocol/GranitProtocolDecoder.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/GranitProtocol.java b/src/org/traccar/protocol/GranitProtocol.java
index 07357b786..a33c43d20 100644
--- a/src/org/traccar/protocol/GranitProtocol.java
+++ b/src/org/traccar/protocol/GranitProtocol.java
@@ -40,7 +40,7 @@ public class GranitProtocol extends BaseProtocol {
TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024, true, false));
+ pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
pipeline.addLast("objectEncoder", new GranitProtocolEncoder());
pipeline.addLast("objectDecoder", new GranitProtocolDecoder(GranitProtocol.this));
}
diff --git a/src/org/traccar/protocol/GranitProtocolDecoder.java b/src/org/traccar/protocol/GranitProtocolDecoder.java
index c919b3d65..b92bc72e2 100644
--- a/src/org/traccar/protocol/GranitProtocolDecoder.java
+++ b/src/org/traccar/protocol/GranitProtocolDecoder.java
@@ -81,8 +81,8 @@ public class GranitProtocolDecoder extends BaseProtocolDecoder {
int latDegrees = buf.readUnsignedByte();
int lonMinutes = buf.readUnsignedShort();
int latMinutes = buf.readUnsignedShort();
- double latitude = latDegrees + (double) latMinutes / 60000;
- double longitude = lonDegrees + (double) lonMinutes / 60000;
+ double latitude = latDegrees + latMinutes / 60000.0;
+ double longitude = lonDegrees + lonMinutes / 60000.0;
if (!BitUtil.check(flags, 4)) {
latitude = -latDegrees;
}