aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/AplicomProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/AutoGradeProtocolDecoder.java2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java
index 8c06aad6f..bcaac5349 100644
--- a/src/org/traccar/protocol/AplicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java
@@ -466,7 +466,10 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
position.set("tripDistance", buf.readUnsignedInt() * 5);
position.set("serviceDistance", (buf.readUnsignedInt() - 2105540607) * 5);
} else if (type == 0x0A) {
- position.set("brakeData", ChannelBuffers.hexDump(buf.readBytes(length)));
+ ChannelBuffer brakeData = buf.readBytes(length);
+ position.set("absStatusCounter", brakeData.readUnsignedShort());
+ position.set("atvbStatusCounter", brakeData.readUnsignedShort());
+ position.set("vdcActiveCounter", brakeData.readUnsignedShort());
} else if (type == 0x0B) {
position.set("brakeMinMaxData", ChannelBuffers.hexDump(buf.readBytes(length)));
} else if (type == 0x0C) {
diff --git a/src/org/traccar/protocol/AutoGradeProtocolDecoder.java b/src/org/traccar/protocol/AutoGradeProtocolDecoder.java
index d8fe8b1a2..744117cfe 100644
--- a/src/org/traccar/protocol/AutoGradeProtocolDecoder.java
+++ b/src/org/traccar/protocol/AutoGradeProtocolDecoder.java
@@ -89,7 +89,7 @@ public class AutoGradeProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(parser.nextDouble());
- int status = (byte) parser.next().charAt(0);
+ int status = parser.next().charAt(0);
position.set(Position.KEY_STATUS, status);
position.set(Position.KEY_IGNITION, BitUtil.check(status, 0));