aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/BceProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/BceProtocolDecoder.java b/src/org/traccar/protocol/BceProtocolDecoder.java
index a023e60c5..db0ec8c66 100644
--- a/src/org/traccar/protocol/BceProtocolDecoder.java
+++ b/src/org/traccar/protocol/BceProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2018 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -96,9 +96,9 @@ public class BceProtocolDecoder extends BaseProtocolDecoder {
position.setLatitude(buf.readFloat());
position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()));
- int gps = buf.readUnsignedByte();
- position.set(Position.KEY_SATELLITES, gps & 0xf);
- position.set(Position.KEY_HDOP, gps >> 4);
+ int status = buf.readUnsignedByte();
+ position.set(Position.KEY_SATELLITES, BitUtil.to(status, 4));
+ position.set(Position.KEY_HDOP, BitUtil.from(status, 4));
position.setCourse(buf.readUnsignedByte());
position.setAltitude(buf.readUnsignedShort());