diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-12 17:54:00 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-12 17:54:00 +1200 |
commit | a2dac324574dde8fe8e57bd46dd7f94d0fb60231 (patch) | |
tree | 061e957cb53e00214a33acb6317be9c0849c50fa /src/org/traccar/protocol/Tk103ProtocolDecoder.java | |
parent | f1ae2d73584d4ddded6f727c665d97f03ecf9c25 (diff) | |
download | trackermap-server-a2dac324574dde8fe8e57bd46dd7f94d0fb60231.tar.gz trackermap-server-a2dac324574dde8fe8e57bd46dd7f94d0fb60231.tar.bz2 trackermap-server-a2dac324574dde8fe8e57bd46dd7f94d0fb60231.zip |
Re-factor configuration access
Diffstat (limited to 'src/org/traccar/protocol/Tk103ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Tk103ProtocolDecoder.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index 1b34f3f81..e884f4be2 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -20,10 +20,7 @@ import java.util.Calendar; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; - import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelHandlerContext; - import org.traccar.BaseProtocolDecoder; import org.traccar.Context; import org.traccar.helper.UnitsConverter; @@ -123,7 +120,7 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { position.setLongitude(longitude); // Speed - if (Boolean.valueOf(Context.getProps().getProperty(getProtocolName() + ".mph"))) { + if (Context.getConfig().getBoolean(getProtocolName() + ".mph")) { position.setSpeed(UnitsConverter.knotsFromMph(Double.valueOf(parser.group(index++)))); } else { position.setSpeed(UnitsConverter.knotsFromKph(Double.valueOf(parser.group(index++)))); |