aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-05-18 22:52:00 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-05-18 22:52:19 +1200
commit0be2a81b30c91f065b4c038697a9d4c740a7dc9c (patch)
tree53b130a1bba56b9d269a562b6c9fd3ab389f131b
parentee66c9239381168b36eaa68cd1e962e4034a81f2 (diff)
downloadtrackermap-server-0be2a81b30c91f065b4c038697a9d4c740a7dc9c.tar.gz
trackermap-server-0be2a81b30c91f065b4c038697a9d4c740a7dc9c.tar.bz2
trackermap-server-0be2a81b30c91f065b4c038697a9d4c740a7dc9c.zip
Add support for WT watch message type
-rw-r--r--src/org/traccar/protocol/WatchProtocolDecoder.java3
-rw-r--r--test/org/traccar/protocol/WatchProtocolDecoderTest.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WatchProtocolDecoder.java b/src/org/traccar/protocol/WatchProtocolDecoder.java
index 437cf3407..3ec33d210 100644
--- a/src/org/traccar/protocol/WatchProtocolDecoder.java
+++ b/src/org/traccar/protocol/WatchProtocolDecoder.java
@@ -166,7 +166,8 @@ public class WatchProtocolDecoder extends BaseProtocolDecoder {
}
}
- } else if (type.equals("UD") || type.equals("UD2") || type.equals("UD3") || type.equals("AL")) {
+ } else if (type.equals("UD") || type.equals("UD2") || type.equals("UD3")
+ || type.equals("AL") || type.equals("WT")) {
if (type.equals("AL")) {
sendResponse(channel, manufacturer, id, "AL");
diff --git a/test/org/traccar/protocol/WatchProtocolDecoderTest.java b/test/org/traccar/protocol/WatchProtocolDecoderTest.java
index a1b9e458a..97deed8a9 100644
--- a/test/org/traccar/protocol/WatchProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/WatchProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class WatchProtocolDecoderTest extends ProtocolTest {
WatchProtocolDecoder decoder = new WatchProtocolDecoder(new WatchProtocol());
verifyPosition(decoder, text(
+ "[3G*6005412902*011F*WT,170517,133811,V,18.512200,N,73.7750283,E,0.00,0.0,0.0,0,92,82,4262,0,00000010,2,1,404,22,10125,8301,141,10125,13921,122,5,Skynet,28:c6:8e:be:87:c0,-60,Intel Wi-Fi,4c:60:de:32:3d:38,-70,Nirvanic-2,40:e3:d6:4a:d9:c2,-73,A4-Guest,40:e3:d6:4a:d9:c4,-73,A4Idatix,40:e3:d6:4a:d9:c3,-73,13.8]"));
+
+ verifyPosition(decoder, text(
"[3G*8308406279*00CC*UD3,170417,190930,V,54.739618,N,25.273213,E,0.0,323.53,175.1,6,51,83,0,0,00000000,1,1,246,01,200,13242758,51,3,TEO-189835,00:8c:54:58:1d:64,-84,Cgates_7137,78:54:2e:e3:71:37,-85,ASUS,9c:5c:8e:b8:d4:78,-93]"));
verifyPosition(decoder, text(