diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-05-25 17:01:43 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-05-25 17:01:43 -0700 |
commit | eedf41bb641a8429d3bfe624d9dcbbd543eec494 (patch) | |
tree | 0c8c599f16a0510e5d2109c0bf5fc45df5ff65a1 /src/main/java/org/traccar/protocol | |
parent | 94373d66363bc1b89e3c6597e72d7c4294101fb5 (diff) | |
download | trackermap-server-eedf41bb641a8429d3bfe624d9dcbbd543eec494.tar.gz trackermap-server-eedf41bb641a8429d3bfe624d9dcbbd543eec494.tar.bz2 trackermap-server-eedf41bb641a8429d3bfe624d9dcbbd543eec494.zip |
Correctly decode speed units
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/FlespiProtocolDecoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/FlespiProtocolDecoder.java b/src/main/java/org/traccar/protocol/FlespiProtocolDecoder.java index 86da3943e..7405fb6ef 100644 --- a/src/main/java/org/traccar/protocol/FlespiProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/FlespiProtocolDecoder.java @@ -21,6 +21,7 @@ import io.netty.handler.codec.http.HttpResponseStatus; import org.traccar.BaseHttpProtocolDecoder; import org.traccar.DeviceSession; import org.traccar.Protocol; +import org.traccar.helper.UnitsConverter; import org.traccar.model.Position; import javax.json.Json; @@ -102,7 +103,7 @@ public class FlespiProtocolDecoder extends BaseHttpProtocolDecoder { position.setLongitude(((JsonNumber) value).doubleValue()); return true; case "position.speed": - position.setSpeed(((JsonNumber) value).doubleValue()); + position.setSpeed(UnitsConverter.knotsFromKph(((JsonNumber) value).doubleValue())); return true; case "position.direction": position.setCourse(((JsonNumber) value).doubleValue()); |