From eb860e161ace4f61249b795d83b993f98374716c Mon Sep 17 00:00:00 2001 From: Jose Castellanos Date: Fri, 7 Apr 2017 22:56:28 -0500 Subject: Fixed comments from pull request --- src/org/traccar/protocol/EnforaProtocolEncoder.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/EnforaProtocolEncoder.java b/src/org/traccar/protocol/EnforaProtocolEncoder.java index b13957ed6..56e56942c 100644 --- a/src/org/traccar/protocol/EnforaProtocolEncoder.java +++ b/src/org/traccar/protocol/EnforaProtocolEncoder.java @@ -1,5 +1,6 @@ /* - * Copyright 2016 Anton Tananaev (anton@traccar.org) + * Copyright 2017 Anton Tananaev (anton@traccar.org) + * Jose Castellanos * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +32,7 @@ public class EnforaProtocolEncoder extends StringProtocolEncoder { byte[] contentBytes = content.getBytes(); - buf.writeByte(0x00); // Byte 0 Length - buf.writeByte(contentBytes.length + 6); // Byte 1 Length + buf.writeShort(contentBytes.length + 6); // Byte 0 Byte 1 Length buf.writeByte(0x00); // Byte 2 Api Number Sequence buf.writeByte(0x00); // Byte 3 Api Number Sequence buf.writeByte(0x04); // Byte 4 Command Type 4 AT Command @@ -45,9 +45,6 @@ public class EnforaProtocolEncoder extends StringProtocolEncoder { @Override protected Object encodeCommand(Command command) { - - initDevicePassword(command, ""); - switch (command.getType()) { case Command.TYPE_CUSTOM: return encodeContent(command.getString(Command.KEY_DATA)); -- cgit v1.2.3