diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-02-18 21:27:12 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-02-18 21:27:12 -0800 |
commit | 4512941667653c15a28e0917024c04b73238005a (patch) | |
tree | cc34c91ac1a187d0e590fd6d4821e6828ac96faa /src/main/java/org/traccar/protocol | |
parent | d199eb36f3b70d80f0a2cffead5777c7998c4e31 (diff) | |
download | trackermap-server-4512941667653c15a28e0917024c04b73238005a.tar.gz trackermap-server-4512941667653c15a28e0917024c04b73238005a.tar.bz2 trackermap-server-4512941667653c15a28e0917024c04b73238005a.zip |
Convert decoded values
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/BceProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/BceProtocolDecoder.java b/src/main/java/org/traccar/protocol/BceProtocolDecoder.java index 68d4447ec..54136382c 100644 --- a/src/main/java/org/traccar/protocol/BceProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/BceProtocolDecoder.java @@ -113,7 +113,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_FUEL_LEVEL, buf.readUnsignedByte()); } if (BitUtil.check(mask, 4)) { - position.set(Position.KEY_RPM, buf.readUnsignedShortLE()); + position.set(Position.KEY_RPM, buf.readUnsignedShortLE() * 0.0125); } if (BitUtil.check(mask, 5)) { position.set(Position.KEY_HOURS, buf.readUnsignedIntLE()); @@ -122,7 +122,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_ODOMETER, buf.readUnsignedIntLE()); } if (BitUtil.check(mask, 7)) { - position.set(Position.KEY_COOLANT_TEMP, (int) buf.readByte()); + position.set(Position.KEY_COOLANT_TEMP, buf.readByte() - 40); } if (BitUtil.check(mask, 8)) { position.set("fuel2", buf.readUnsignedByte()); |