aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorparveenkumaryadav <parveenkumardeeva@gmail.com>2018-04-14 12:22:51 +0530
committerparveenkumaryadav <parveenkumardeeva@gmail.com>2018-04-14 12:22:51 +0530
commitcc835f74f47a7f1e4f052d1f7ed77965cf1be133 (patch)
treed841fdb95e87540015dc25597b72770716db73f9 /src/org/traccar/protocol
parent1313ec644a58c3988528a27491c16602094286bf (diff)
downloadtrackermap-server-cc835f74f47a7f1e4f052d1f7ed77965cf1be133.tar.gz
trackermap-server-cc835f74f47a7f1e4f052d1f7ed77965cf1be133.tar.bz2
trackermap-server-cc835f74f47a7f1e4f052d1f7ed77965cf1be133.zip
Tk103 Output Control command refactored
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolEncoder.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolEncoder.java b/src/org/traccar/protocol/Tk103ProtocolEncoder.java
index 3375d4ee4..3ec562cc3 100644
--- a/src/org/traccar/protocol/Tk103ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolEncoder.java
@@ -98,13 +98,7 @@ public class Tk103ProtocolEncoder extends StringProtocolEncoder {
case Command.TYPE_ENGINE_RESUME:
return formatCommand(command, "({%s}AV011)", Command.KEY_UNIQUE_ID);
case Command.TYPE_OUTPUT_CONTROL:
- if (command.getAttributes().containsKey(Command.KEY_DATA)) {
- if (command.getAttributes().get(Command.KEY_DATA).equals("1")) {
- return formatCommand(command, "({%s}AV001)", Command.KEY_UNIQUE_ID);
- } else {
- return formatCommand(command, "({%s}AV000)", Command.KEY_UNIQUE_ID);
- }
- }
+ return formatCommand(command, "({%s}AV00{%s})", Command.KEY_UNIQUE_ID, Command.KEY_DATA);
default:
Log.warning(new UnsupportedOperationException(command.getType()));
return null;