aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorYuriy Piskarev <yuriy.piskarev@gmail.com>2023-09-27 23:29:32 +0300
committerYuriy Piskarev <yuriy.piskarev@gmail.com>2023-09-27 23:29:32 +0300
commit2fbf2734f3d6d2dcd6dbb44eb92defb25e01671f (patch)
treefc5120320e201d7b71fb04addaec32e657a6a9c2 /src/main/java/org
parent2e52618a0b122f226646dc48436ca7dc6ec8cc39 (diff)
downloadtrackermap-server-2fbf2734f3d6d2dcd6dbb44eb92defb25e01671f.tar.gz
trackermap-server-2fbf2734f3d6d2dcd6dbb44eb92defb25e01671f.tar.bz2
trackermap-server-2fbf2734f3d6d2dcd6dbb44eb92defb25e01671f.zip
fix after tests:
- fields 53, 66 (fix for liters); - field 54 fix extra multiplier.
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java b/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
index 9272b9e0b..1a64cedcb 100644
--- a/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
@@ -316,13 +316,13 @@ public class NavtelecomProtocolDecoder extends BaseProtocolDecoder {
if (BitUtil.check(value, 15)) {
position.set("obdFuelLevel", BitUtil.to(value, 14));
} else {
- position.set("obdFuel", BitUtil.to(value, 14) / 10);
+ position.set("obdFuel", BitUtil.to(value, 14) / 10.0);
}
}
break;
case 54:
double dValue = buf.readFloatLE() * 0.5;
- position.set(Position.KEY_FUEL_USED, (dValue >= 0) ? (dValue * 0.5) : null);
+ position.set(Position.KEY_FUEL_USED, (dValue >= 0) ? dValue : null);
break;
case 55:
value = buf.readUnsignedShortLE();
@@ -361,7 +361,7 @@ public class NavtelecomProtocolDecoder extends BaseProtocolDecoder {
if (BitUtil.check(value, 15)) {
position.set("obdAdBlueLevel", BitUtil.to(value, 14));
} else {
- position.set("obdAdBlue", BitUtil.to(value, 14) / 10);
+ position.set("obdAdBlue", BitUtil.to(value, 14) / 10.0);
}
}
break;