aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-11-09 19:01:19 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-11-09 19:01:19 +1300
commitcf0565caceee6856328e481dd23600ed2590c88a (patch)
tree9d2cc8cf8d3eb27b36412eb492ad702581891f1c /src/org/traccar/protocol/SkypatrolProtocolDecoder.java
parentf9ecee5b732b0c82c8a95bebdb5e275ea479cccc (diff)
downloadtrackermap-server-cf0565caceee6856328e481dd23600ed2590c88a.tar.gz
trackermap-server-cf0565caceee6856328e481dd23600ed2590c88a.tar.bz2
trackermap-server-cf0565caceee6856328e481dd23600ed2590c88a.zip
Improve unit test verification
Diffstat (limited to 'src/org/traccar/protocol/SkypatrolProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/SkypatrolProtocolDecoder.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
index 72fa45ac7..bf1295aea 100644
--- a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
+++ b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2013 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,14 +27,8 @@ import org.traccar.helper.Log;
import org.traccar.model.ExtendedInfoFormatter;
import org.traccar.model.Position;
-/**
- * T55 tracker protocol decoder
- */
public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
- /**
- * Initialize
- */
public SkypatrolProtocolDecoder(ServerManager serverManager) {
super(serverManager);
}
@@ -57,9 +51,6 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
return sign * degrees;
}
- /**
- * Decode message
- */
@Override
protected Object decode(
ChannelHandlerContext ctx, Channel channel, Object msg)
@@ -177,7 +168,7 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
// Altitude
if (checkBit(mask, 15)) {
- buf.skipBytes(3);
+ position.setAltitude((double) buf.readMedium());
}
// Satellites