diff options
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/model/Command.java | 3 | ||||
-rw-r--r-- | src/org/traccar/protocol/Gps103Protocol.java | 3 | ||||
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolEncoder.java | 4 |
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); |