aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/MeitrackProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/MeitrackProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/MeitrackProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
index 82cba08a5..7c5399a37 100644
--- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
@@ -252,7 +252,8 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder {
command.append(imei).append(",CCC,").append(positions.size()).append("*");
int checksum = 0;
for (int i = 0; i < command.length(); i += 1) checksum += command.charAt(i);
- command.append(String.format("%02x\r\n", checksum & 0xff).toUpperCase());
+ command.append(String.format("%02x", checksum & 0xff).toUpperCase());
+ command.append("\r\n");
channel.write(command.toString());
}