aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/StartekProtocol.java1
-rw-r--r--src/main/java/org/traccar/protocol/StartekProtocolEncoder.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/StartekProtocol.java b/src/main/java/org/traccar/protocol/StartekProtocol.java
index 230dc3118..32f1c5a29 100644
--- a/src/main/java/org/traccar/protocol/StartekProtocol.java
+++ b/src/main/java/org/traccar/protocol/StartekProtocol.java
@@ -27,6 +27,7 @@ public class StartekProtocol extends BaseProtocol {
public StartekProtocol() {
setSupportedDataCommands(
+ Command.TYPE_CUSTOM,
Command.TYPE_OUTPUT_CONTROL,
Command.TYPE_ENGINE_STOP,
Command.TYPE_ENGINE_RESUME);
diff --git a/src/main/java/org/traccar/protocol/StartekProtocolEncoder.java b/src/main/java/org/traccar/protocol/StartekProtocolEncoder.java
index 300004c5e..011a8dfae 100644
--- a/src/main/java/org/traccar/protocol/StartekProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/StartekProtocolEncoder.java
@@ -40,6 +40,8 @@ public class StartekProtocolEncoder extends StringProtocolEncoder {
protected Object encodeCommand(Channel channel, Command command) {
switch (command.getType()) {
+ case Command.TYPE_CUSTOM:
+ return formatCommand(command, "%s", Command.KEY_DATA);
case Command.TYPE_OUTPUT_CONTROL:
return formatCommand(command, "900,%s,%s", Command.KEY_INDEX, Command.KEY_DATA);
case Command.TYPE_ENGINE_STOP: