aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-05 22:45:38 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-05 22:45:38 +1300
commit923a49d6bc33f94bf39b8be13c77b1dad4d1dda0 (patch)
tree85f7b5c83d75b4b913d73c08a5039e73d171cfc0
parentca8264c895b67cb040b63604500254465abc7677 (diff)
downloadtraccar-server-923a49d6bc33f94bf39b8be13c77b1dad4d1dda0.tar.gz
traccar-server-923a49d6bc33f94bf39b8be13c77b1dad4d1dda0.tar.bz2
traccar-server-923a49d6bc33f94bf39b8be13c77b1dad4d1dda0.zip
Another try at GT06 commands
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolEncoder.java4
-rw-r--r--test/org/traccar/protocol/Gt06ProtocolEncoderTest.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolEncoder.java b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
index edcfae083..e842c3a69 100644
--- a/src/org/traccar/protocol/Gt06ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
@@ -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 e3bec139c..7f616d9df 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(
- "78780e80080000000044594423000053780d0a")));
+ "787812800c0000000052656c61792c312300009dee0d0a")));
}