aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-30 14:04:24 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-30 14:04:24 -0700
commit014cf82a9e63a36e944e293932f9edf27e452919 (patch)
tree7ac5899f535fbf47e66dc1321738c951473a009b /src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java
parentce661ec77a957b70c15509c6801e6f34b32ad11d (diff)
downloadtrackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.tar.gz
trackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.tar.bz2
trackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.zip
No context dependency for decoder
Diffstat (limited to 'src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java
index 8aae310bb..818acd805 100644
--- a/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java
@@ -20,7 +20,6 @@ import io.netty.channel.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.Protocol;
import org.traccar.config.Keys;
@@ -35,11 +34,15 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
private static final Logger LOGGER = LoggerFactory.getLogger(SkypatrolProtocolDecoder.class);
- private final long defaultMask;
+ private long defaultMask;
public SkypatrolProtocolDecoder(Protocol protocol) {
super(protocol);
- defaultMask = Context.getConfig().getInteger(Keys.PROTOCOL_MASK.withPrefix(getProtocolName()));
+ }
+
+ @Override
+ protected void init() {
+ defaultMask = getConfig().getInteger(Keys.PROTOCOL_MASK.withPrefix(getProtocolName()));
}
private static double convertCoordinate(long coordinate) {