aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-18 22:40:44 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-18 22:40:44 -0700
commitbfe6c5736899e82ba5f9754d4acc5493c34faff4 (patch)
treece4b75a7272497c717fa48d9d6e5d9535f61d872 /src/main/java/org
parentf458cbe473bdc49157415a8bfc6441afd86b670e (diff)
downloadtrackermap-server-bfe6c5736899e82ba5f9754d4acc5493c34faff4.tar.gz
trackermap-server-bfe6c5736899e82ba5f9754d4acc5493c34faff4.tar.bz2
trackermap-server-bfe6c5736899e82ba5f9754d4acc5493c34faff4.zip
Decode hex values correctly
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
index aeb57a116..46ef4fff8 100644
--- a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
@@ -648,16 +648,16 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_AXLE_WEIGHT, Integer.parseInt(values[index - 1]));
}
if (BitUtil.check(reportMask, 16) && !values[index++].isEmpty()) {
- position.set("tachographInfo", Integer.parseInt(values[index - 1]));
+ position.set("tachographInfo", Integer.parseInt(values[index - 1], 16));
}
if (BitUtil.check(reportMask, 17) && !values[index++].isEmpty()) {
- position.set("indicators", Integer.parseInt(values[index - 1]));
+ position.set("indicators", Integer.parseInt(values[index - 1], 16));
}
if (BitUtil.check(reportMask, 18) && !values[index++].isEmpty()) {
- position.set("lights", Integer.parseInt(values[index - 1]));
+ position.set("lights", Integer.parseInt(values[index - 1], 16));
}
if (BitUtil.check(reportMask, 19) && !values[index++].isEmpty()) {
- position.set("doors", Integer.parseInt(values[index - 1]));
+ position.set("doors", Integer.parseInt(values[index - 1], 16));
}
if (BitUtil.check(reportMask, 20) && !values[index++].isEmpty()) {
position.set("vehicleOverspeed", Double.parseDouble(values[index - 1]));