aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolEncoder.java6
-rw-r--r--test/org/traccar/protocol/Gt06ProtocolEncoderTest.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolEncoder.java b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
index 82c689d9e..b879163d2 100644
--- a/src/org/traccar/protocol/Gt06ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
@@ -38,7 +38,7 @@ public class Gt06ProtocolEncoder extends BaseProtocolEncoder {
buf.writeInt(0);
buf.writeBytes(content.getBytes()); // command
- buf.writeShort(1); // message index
+ buf.writeShort(0); // message index
buf.writeShort(Crc.crc16Ccitt(buf.toByteBuffer(2, buf.writerIndex() - 2)));
@@ -53,9 +53,9 @@ public class Gt06ProtocolEncoder extends BaseProtocolEncoder {
switch (command.getType()) {
case Command.TYPE_ENGINE_STOP:
- return encodeContent("DYD#");
+ return encodeContent("RELAY,1#");
case Command.TYPE_ENGINE_RESUME:
- return encodeContent("HFYD#");
+ return encodeContent("RELAY,0#");
}
return null;
diff --git a/test/org/traccar/protocol/Gt06ProtocolEncoderTest.java b/test/org/traccar/protocol/Gt06ProtocolEncoderTest.java
index 586fb0859..2eadb2e20 100644
--- a/test/org/traccar/protocol/Gt06ProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/Gt06ProtocolEncoderTest.java
@@ -18,7 +18,7 @@ public class Gt06ProtocolEncoderTest {
command.setType(Command.TYPE_ENGINE_STOP);
Assert.assertEquals(encoder.encodeCommand(command), ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "78780e800800000000445944230001d09e0d0a")));
+ "787812800c0000000052454c41592c312300001c300d0a")));
}