aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-05-04 15:23:51 +1200
committerGitHub <noreply@github.com>2017-05-04 15:23:51 +1200
commit4ce5dd893d3b95fc759fd1d0e0dbf09d0d559936 (patch)
treeba1e3241a3b35bcb922afff1650efa684ba3d278 /src/org/traccar
parent2d8e0b1070f998edd90c15b275f219b3368e956a (diff)
parent8794c964069b11e44a79b1e5f9dabac6799f18cd (diff)
downloadtrackermap-server-4ce5dd893d3b95fc759fd1d0e0dbf09d0d559936.tar.gz
trackermap-server-4ce5dd893d3b95fc759fd1d0e0dbf09d0d559936.tar.bz2
trackermap-server-4ce5dd893d3b95fc759fd1d0e0dbf09d0d559936.zip
Merge pull request #3142 from AnshulJain1985/GT06
Send any custom commands for GT06.
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/Gt06Protocol.java3
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolEncoder.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06Protocol.java b/src/org/traccar/protocol/Gt06Protocol.java
index aa8f1f0c0..f45ac95ee 100644
--- a/src/org/traccar/protocol/Gt06Protocol.java
+++ b/src/org/traccar/protocol/Gt06Protocol.java
@@ -29,7 +29,8 @@ public class Gt06Protocol extends BaseProtocol {
super("gt06");
setSupportedDataCommands(
Command.TYPE_ENGINE_STOP,
- Command.TYPE_ENGINE_RESUME);
+ Command.TYPE_ENGINE_RESUME,
+ Command.TYPE_CUSTOM);
}
@Override
diff --git a/src/org/traccar/protocol/Gt06ProtocolEncoder.java b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
index 7298f0ff6..a3e0a2264 100644
--- a/src/org/traccar/protocol/Gt06ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
@@ -63,6 +63,8 @@ public class Gt06ProtocolEncoder extends BaseProtocolEncoder {
return encodeContent(alternative ? "DYD,123456#" : "Relay,1#");
case Command.TYPE_ENGINE_RESUME:
return encodeContent(alternative ? "HFYD,123456#" : "Relay,0#");
+ case Command.TYPE_CUSTOM:
+ return encodeContent(command.getString(Command.KEY_DATA));
default:
Log.warning(new UnsupportedOperationException(command.getType()));
break;