aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-30 23:03:26 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-30 23:03:26 +1300
commit161875aaccca9799fb0e79948781547930664158 (patch)
treeec0731e264ddcde459a2361dd407a401743195d6 /src/org
parentf757f587aca7491d27f2f536cf402de8cbee1d1e (diff)
downloadtrackermap-server-161875aaccca9799fb0e79948781547930664158.tar.gz
trackermap-server-161875aaccca9799fb0e79948781547930664158.tar.bz2
trackermap-server-161875aaccca9799fb0e79948781547930664158.zip
Attempt to fix GT06 commands
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolEncoder.java6
1 files changed, 3 insertions, 3 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;