aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-04-24 23:56:46 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-04-24 23:56:46 +1200
commit69b3a1e33ae071d722b7c73df8405d8e8fb9bd08 (patch)
treee22eaf9eadf1ce4ec54c1fc7df22df03a18629b1 /src/org/traccar/protocol
parent07d3ff0538c4999b7ac445d5c41af3c67c098bce (diff)
parent74f2e3d3777c7d213c35aeb4de90eb085e4f4d25 (diff)
downloadtrackermap-server-69b3a1e33ae071d722b7c73df8405d8e8fb9bd08.tar.gz
trackermap-server-69b3a1e33ae071d722b7c73df8405d8e8fb9bd08.tar.bz2
trackermap-server-69b3a1e33ae071d722b7c73df8405d8e8fb9bd08.zip
Merge pull request #1901 from gaborgsomogyi/h02-supported-commands-update
H02 supported commands update
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/H02Protocol.java5
-rw-r--r--src/org/traccar/protocol/H02ProtocolEncoder.java5
2 files changed, 7 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/H02Protocol.java b/src/org/traccar/protocol/H02Protocol.java
index 2574666fe..72b4f903d 100644
--- a/src/org/traccar/protocol/H02Protocol.java
+++ b/src/org/traccar/protocol/H02Protocol.java
@@ -30,7 +30,10 @@ public class H02Protocol extends BaseProtocol {
super("h02");
setSupportedCommands(
Command.TYPE_ALARM_ARM,
- Command.TYPE_ALARM_DISARM
+ Command.TYPE_ALARM_DISARM,
+ Command.TYPE_ENGINE_STOP,
+ Command.TYPE_ENGINE_RESUME,
+ Command.TYPE_POSITION_PERIODIC
);
}
diff --git a/src/org/traccar/protocol/H02ProtocolEncoder.java b/src/org/traccar/protocol/H02ProtocolEncoder.java
index ba362f88e..6475c0c67 100644
--- a/src/org/traccar/protocol/H02ProtocolEncoder.java
+++ b/src/org/traccar/protocol/H02ProtocolEncoder.java
@@ -36,7 +36,7 @@ public class H02ProtocolEncoder extends StringProtocolEncoder {
dt.getSecondOfMinute()
);
- for(String param : params) {
+ for (String param : params) {
result += "," + param;
}
@@ -58,7 +58,8 @@ public class H02ProtocolEncoder extends StringProtocolEncoder {
case Command.TYPE_ENGINE_RESUME:
return formatCommand(dt, uniqueId, "S20", "0", "0");
case Command.TYPE_POSITION_PERIODIC:
- return formatCommand(dt, uniqueId, "S71", "22", command.getAttributes().get(Command.KEY_FREQUENCY).toString());
+ return formatCommand(dt, uniqueId, "S71", "22",
+ command.getAttributes().get(Command.KEY_FREQUENCY).toString());
default:
Log.warning(new UnsupportedOperationException(command.getType()));
break;