diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/StartekProtocolEncoder.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/StartekProtocolEncoder.java b/src/main/java/org/traccar/protocol/StartekProtocolEncoder.java index a96502f11..300004c5e 100644 --- a/src/main/java/org/traccar/protocol/StartekProtocolEncoder.java +++ b/src/main/java/org/traccar/protocol/StartekProtocolEncoder.java @@ -31,7 +31,7 @@ public class StartekProtocolEncoder extends StringProtocolEncoder { protected String formatCommand(Command command, String format, String... keys) { String uniqueId = getUniqueId(command.getDeviceId()); String payload = super.formatCommand(command, format, keys); - int length = uniqueId.length() + 1 + payload.length(); + int length = 1 + uniqueId.length() + 1 + payload.length(); String sentence = "$$:" + length + "," + uniqueId + "," + payload; return sentence + Checksum.sum(sentence) + "\r\n"; } |