aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-28 10:15:46 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-28 10:15:46 +1200
commita1b042162c4dd6f3adb1e505dd85e9854a5913f9 (patch)
treeb49138faf195faf3a009a33780678473676be17d
parent183c05adf926b59638d854f04b424c2855109f9d (diff)
downloadtraccar-server-a1b042162c4dd6f3adb1e505dd85e9854a5913f9.tar.gz
traccar-server-a1b042162c4dd6f3adb1e505dd85e9854a5913f9.tar.bz2
traccar-server-a1b042162c4dd6f3adb1e505dd85e9854a5913f9.zip
Update GPS103 command encoder
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolEncoder.java8
-rw-r--r--test/org/traccar/protocol/Gps103ProtocolEncoderTest.java2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolEncoder.java b/src/org/traccar/protocol/Gps103ProtocolEncoder.java
index 9d8c3e9ba..5972ccb59 100644
--- a/src/org/traccar/protocol/Gps103ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolEncoder.java
@@ -42,13 +42,13 @@ 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);
+ return formatCommand(command, "**,{%s},A;", Command.KEY_UNIQUE_ID);
case Command.TYPE_POSITION_FIX:
- return formatCommand(command, "**,imei:{%s},C,{%s};", this, Command.KEY_UNIQUE_ID, Command.KEY_FREQUENCY);
+ return formatCommand(command, "**,{%s},C,{%s};", this, Command.KEY_UNIQUE_ID, Command.KEY_FREQUENCY);
case Command.TYPE_ENGINE_STOP:
- return formatCommand(command, "**,imei:{%s},K;", Command.KEY_UNIQUE_ID);
+ return formatCommand(command, "**,{%s},K;", Command.KEY_UNIQUE_ID);
case Command.TYPE_ENGINE_RESUME:
- return formatCommand(command, "**,imei:{%s},J;", Command.KEY_UNIQUE_ID);
+ return formatCommand(command, "**,{%s},J;", Command.KEY_UNIQUE_ID);
}
return null;
diff --git a/test/org/traccar/protocol/Gps103ProtocolEncoderTest.java b/test/org/traccar/protocol/Gps103ProtocolEncoderTest.java
index 5060c576a..cd9944ada 100644
--- a/test/org/traccar/protocol/Gps103ProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/Gps103ProtocolEncoderTest.java
@@ -22,7 +22,7 @@ public class Gps103ProtocolEncoderTest {
command.setOther(other);
- Assert.assertEquals("**,imei:123456789012345,C,05m;", encoder.encodeCommand(command));
+ Assert.assertEquals("**,123456789012345,C,05m;", encoder.encodeCommand(command));
}