aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/SuntechProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-16 12:54:28 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-16 12:54:28 -0700
commitdb97378f2210818d0600420bc9c69103ddea248b (patch)
tree88a66baf0e06b3ce10a95b9b95bfc8337732a050 /src/main/java/org/traccar/protocol/SuntechProtocolEncoder.java
parent3f01f92125851e325b8e3e4ef679d832fe3dee21 (diff)
downloadtrackermap-server-db97378f2210818d0600420bc9c69103ddea248b.tar.gz
trackermap-server-db97378f2210818d0600420bc9c69103ddea248b.tar.bz2
trackermap-server-db97378f2210818d0600420bc9c69103ddea248b.zip
Improve Suntech support
Diffstat (limited to 'src/main/java/org/traccar/protocol/SuntechProtocolEncoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/SuntechProtocolEncoder.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolEncoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolEncoder.java
index 597acaae8..53308f968 100644
--- a/src/main/java/org/traccar/protocol/SuntechProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/SuntechProtocolEncoder.java
@@ -45,13 +45,13 @@ public class SuntechProtocolEncoder extends StringProtocolEncoder {
}
if (universal) {
- return encodeUniversalCommand(channel, command);
+ return encodeUniversalCommand(command);
} else {
- return encodeLegacyCommand(channel, prefix, command);
+ return encodeLegacyCommand(prefix, command);
}
}
- protected Object encodeUniversalCommand(Channel channel, Command command) {
+ protected Object encodeUniversalCommand(Command command) {
switch (command.getType()) {
case Command.TYPE_REBOOT_DEVICE:
return formatCommand(command, "CMD;%s;03;03\r", Command.KEY_UNIQUE_ID);
@@ -84,7 +84,7 @@ public class SuntechProtocolEncoder extends StringProtocolEncoder {
case Command.TYPE_ENGINE_STOP:
return formatCommand(command, "CMD;%s;04;01\r", Command.KEY_UNIQUE_ID);
case Command.TYPE_ENGINE_RESUME:
- return formatCommand(command, "CMD;%s;02;02\r", Command.KEY_UNIQUE_ID);
+ return formatCommand(command, "CMD;%s;04;02\r", Command.KEY_UNIQUE_ID);
case Command.TYPE_ALARM_ARM:
return formatCommand(command, "CMD;%s;04;03\r", Command.KEY_UNIQUE_ID);
case Command.TYPE_ALARM_DISARM:
@@ -94,7 +94,7 @@ public class SuntechProtocolEncoder extends StringProtocolEncoder {
}
}
- protected Object encodeLegacyCommand(Channel channel, String prefix, Command command) {
+ protected Object encodeLegacyCommand(String prefix, Command command) {
switch (command.getType()) {
case Command.TYPE_REBOOT_DEVICE:
return formatCommand(command, prefix + "CMD;%s;02;Reboot\r", Command.KEY_UNIQUE_ID);