diff options
author | Jose Castellanos <jose.castellanos.molina@gmail.com> | 2017-04-07 22:56:28 -0500 |
---|---|---|
committer | Jose Castellanos <jose.castellanos.molina@gmail.com> | 2017-04-07 22:56:28 -0500 |
commit | eb860e161ace4f61249b795d83b993f98374716c (patch) | |
tree | 403adb34d95806ec01ac4071a0ead866759d0836 | |
parent | bc7aa50f28f47dbccf26361c09f9b33a59640d84 (diff) | |
download | traccar-server-eb860e161ace4f61249b795d83b993f98374716c.tar.gz traccar-server-eb860e161ace4f61249b795d83b993f98374716c.tar.bz2 traccar-server-eb860e161ace4f61249b795d83b993f98374716c.zip |
Fixed comments from pull request
-rw-r--r-- | src/org/traccar/protocol/EnforaProtocolEncoder.java | 9 |
1 files changed, 3 insertions, 6 deletions
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)); |