aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-29 16:08:08 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-29 16:08:08 +1200
commit1e0f0b2d38f15f3bac670319f52c2925cdaecc3c (patch)
tree628e2fe0afd867f81c8360e443b453bf08f0f8f8 /src
parentc534819d12b984e845f41a95efa3f0ef7b6ebbe6 (diff)
downloadtrackermap-server-1e0f0b2d38f15f3bac670319f52c2925cdaecc3c.tar.gz
trackermap-server-1e0f0b2d38f15f3bac670319f52c2925cdaecc3c.tar.bz2
trackermap-server-1e0f0b2d38f15f3bac670319f52c2925cdaecc3c.zip
Rename some commands
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/model/Command.java3
-rw-r--r--src/org/traccar/protocol/Gps103Protocol.java3
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolEncoder.java4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java
index defa904f7..4558d31ce 100644
--- a/src/org/traccar/model/Command.java
+++ b/src/org/traccar/model/Command.java
@@ -22,8 +22,9 @@ public class Command implements Factory {
public Map<String, Object> getOther() { return other; }
public void setOther(Map<String, Object> other) { this.other = other; }
+ public static final String TYPE_POSITION_SINGLE = "positionSingle";
+ public static final String TYPE_POSITION_PERIODIC = "positionPeriodic";
public static final String TYPE_POSITION_STOP = "positionStop";
- public static final String TYPE_POSITION_FIX = "positionFix";
public static final String TYPE_ENGINE_STOP = "engineStop";
public static final String TYPE_ENGINE_RESUME = "engineResume";
diff --git a/src/org/traccar/protocol/Gps103Protocol.java b/src/org/traccar/protocol/Gps103Protocol.java
index 59d8e62a7..dcac04c5b 100644
--- a/src/org/traccar/protocol/Gps103Protocol.java
+++ b/src/org/traccar/protocol/Gps103Protocol.java
@@ -31,8 +31,9 @@ public class Gps103Protocol extends BaseProtocol {
public Gps103Protocol() {
super("gps103");
setSupportedCommands(
+ Command.TYPE_POSITION_SINGLE,
+ Command.TYPE_POSITION_PERIODIC,
Command.TYPE_POSITION_STOP,
- Command.TYPE_POSITION_FIX,
Command.TYPE_ENGINE_STOP,
Command.TYPE_ENGINE_RESUME);
}
diff --git a/src/org/traccar/protocol/Gps103ProtocolEncoder.java b/src/org/traccar/protocol/Gps103ProtocolEncoder.java
index 3273d2706..df0b50954 100644
--- a/src/org/traccar/protocol/Gps103ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolEncoder.java
@@ -43,7 +43,9 @@ public class Gps103ProtocolEncoder extends StringProtocolEncoder implements Stri
switch (command.getType()) {
case Command.TYPE_POSITION_STOP:
return formatCommand(command, "**,imei:{%s},A;", Command.KEY_UNIQUE_ID);
- case Command.TYPE_POSITION_FIX:
+ case Command.TYPE_POSITION_SINGLE:
+ return formatCommand(command, "**,imei:{%s},B;", Command.KEY_UNIQUE_ID);
+ case Command.TYPE_POSITION_PERIODIC:
return formatCommand(command, "**,imei:{%s},C,{%s};", this, Command.KEY_UNIQUE_ID, Command.KEY_FREQUENCY);
case Command.TYPE_ENGINE_STOP:
return formatCommand(command, "**,imei:{%s},J;", Command.KEY_UNIQUE_ID);