From bfe6c5736899e82ba5f9754d4acc5493c34faff4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 18 Apr 2019 22:40:44 -0700 Subject: Decode hex values correctly --- src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/org') 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])); -- cgit v1.2.3