aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}