aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Pt502ProtocolEncoder.java
diff options
context:
space:
mode:
authordrecchia <danilo@deltatecnologia.com>2016-07-06 11:39:43 -0300
committerdrecchia <danilo@deltatecnologia.com>2016-07-06 11:39:43 -0300
commit9b1d9a276daee380c136a5ccf2c448e6a8e8e9f9 (patch)
tree22dca70c59fbb95b999b79635180e6622ad0120e /src/org/traccar/protocol/Pt502ProtocolEncoder.java
parent81cac93e54e336b78c80e3a099b72d6bb8f3e1b4 (diff)
downloadtrackermap-server-9b1d9a276daee380c136a5ccf2c448e6a8e8e9f9.tar.gz
trackermap-server-9b1d9a276daee380c136a5ccf2c448e6a8e8e9f9.tar.bz2
trackermap-server-9b1d9a276daee380c136a5ccf2c448e6a8e8e9f9.zip
- Pt502 output_control fix.
- Added command for set maxSpeed and sms timezone.
Diffstat (limited to 'src/org/traccar/protocol/Pt502ProtocolEncoder.java')
-rw-r--r--src/org/traccar/protocol/Pt502ProtocolEncoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Pt502ProtocolEncoder.java b/src/org/traccar/protocol/Pt502ProtocolEncoder.java
index 86c6703d4..b8ca8ab15 100644
--- a/src/org/traccar/protocol/Pt502ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Pt502ProtocolEncoder.java
@@ -26,7 +26,11 @@ public class Pt502ProtocolEncoder extends StringProtocolEncoder {
switch (command.getType()) {
case Command.TYPE_OUTPUT_CONTROL:
- return formatCommand(command, "000000OPC{%s},{%s}", Command.KEY_INDEX, Command.KEY_DATA);
+ return formatCommand(command, "#OPC{%s},{%s}\r\n", Command.KEY_INDEX, Command.KEY_DATA);
+ case Command.TYPE_SET_TIMEZONE:
+ return formatCommand(command, "#TMZ{%s}\r\n", Command.KEY_TIMEZONE);
+ case Command.TYPE_ALARM_SPEED:
+ return formatCommand(command, "#SPD{%s}\r\n", Command.KEY_DATA);
default:
Log.warning(new UnsupportedOperationException(command.getType()));
break;