aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-03-29 18:53:28 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-03-29 18:53:28 +1300
commit70b4007226fc0ebcfd5133abb2dcaab61ae929d7 (patch)
tree0f5df88149091537790d434ce0fd3214efaefd85 /src/org
parent1e3e7c767ba88e6439dd512dd64b6a8b746b7e96 (diff)
downloadtraccar-server-70b4007226fc0ebcfd5133abb2dcaab61ae929d7.tar.gz
traccar-server-70b4007226fc0ebcfd5133abb2dcaab61ae929d7.tar.bz2
traccar-server-70b4007226fc0ebcfd5133abb2dcaab61ae929d7.zip
Correctly decode BCE speed value
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/BceProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/BceProtocolDecoder.java b/src/org/traccar/protocol/BceProtocolDecoder.java
index 22d6a5aa8..a023e60c5 100644
--- a/src/org/traccar/protocol/BceProtocolDecoder.java
+++ b/src/org/traccar/protocol/BceProtocolDecoder.java
@@ -21,6 +21,7 @@ import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.helper.BitUtil;
+import org.traccar.helper.UnitsConverter;
import org.traccar.model.CellTower;
import org.traccar.model.Network;
import org.traccar.model.Position;
@@ -93,7 +94,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder {
position.setValid(true);
position.setLongitude(buf.readFloat());
position.setLatitude(buf.readFloat());
- position.setSpeed(buf.readUnsignedByte());
+ position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()));
int gps = buf.readUnsignedByte();
position.set(Position.KEY_SATELLITES, gps & 0xf);