aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-08-25 10:35:10 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-08-25 10:35:22 +1200
commit74519eebedc75fec380005a2a1e6300ddd803ceb (patch)
tree55b0ea7551dcbbb1a9f53a96bba3d881860c3eac /src/org/traccar/protocol
parent052d5a61dbb7a94d4ac2ea4f17deff0f99baec58 (diff)
downloadtrackermap-server-74519eebedc75fec380005a2a1e6300ddd803ceb.tar.gz
trackermap-server-74519eebedc75fec380005a2a1e6300ddd803ceb.tar.bz2
trackermap-server-74519eebedc75fec380005a2a1e6300ddd803ceb.zip
Decode Aplicom event data as HEX
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/AplicomProtocolDecoder.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java
index f530c8fa5..bfd92e0ad 100644
--- a/src/org/traccar/protocol/AplicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java
@@ -103,16 +103,8 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte();
break;
case 119:
- StringBuilder sb = new StringBuilder();
- while (buf.isReadable()) {
- char c = (char) buf.readByte();
- if (c >= 0x20) {
- sb.append(c);
- } else {
- break;
- }
- }
- position.set("eventData", sb.toString());
+ position.set("eventData", ByteBufUtil.hexDump(
+ buf, buf.readerIndex(), Math.min(buf.readableBytes(), 1024)));
break;
case 121:
case 142: