From 15a7049210f7bcdfb56b6afaedbd9d23d2050bcb Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 30 Jun 2015 09:23:28 +1200 Subject: Fix speed value unit --- src/org/traccar/protocol/Tk103ProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index 3c2466543..fb83c59d8 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -123,9 +123,9 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { // Speed if (Boolean.valueOf(Context.getProps().getProperty(getProtocolName() + ".mph"))) { - position.setSpeed(UnitsConverter.knotsFromKph(Double.valueOf(parser.group(index++)))); - } else { position.setSpeed(UnitsConverter.knotsFromMph(Double.valueOf(parser.group(index++)))); + } else { + position.setSpeed(UnitsConverter.knotsFromKph(Double.valueOf(parser.group(index++)))); } // Time -- cgit v1.2.3