From 09b4183fd7ba546209d422d53ea07e273bec26f3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 26 Oct 2015 13:29:37 +1300 Subject: Use hexDump instead of readHexString --- src/org/traccar/protocol/EelinkProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/protocol/EelinkProtocolDecoder.java') diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java index 9183dadbd..e016d542d 100644 --- a/src/org/traccar/protocol/EelinkProtocolDecoder.java +++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java @@ -71,7 +71,7 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder { if (type == MSG_LOGIN) { - identify(ChannelBufferTools.readHexString(buf, 16).substring(1), channel); + identify(ChannelBuffers.hexDump(buf.readBytes(8)).substring(1), channel); } else if (hasDeviceId() && (type == MSG_GPS || type == MSG_ALARM || type == MSG_STATE || type == MSG_SMS)) { @@ -91,7 +91,7 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder { position.setCourse(buf.readUnsignedShort()); // Cell - position.set(Event.KEY_CELL, ChannelBufferTools.readHexString(buf, 18)); + position.set(Event.KEY_CELL, ChannelBuffers.hexDump(buf.readBytes(9))); // Validity position.setValid((buf.readUnsignedByte() & 0x01) != 0); -- cgit v1.2.3