aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-26 07:19:42 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-26 07:19:42 +0400
commit464348b91591a684bc16cf3c207f38ca3f923daa (patch)
tree986db66d55174ee1243befa0b9a6fdf5fedf04f2 /src
parent8fd45f48667a40a9111d8833f5335cfee4ea1fd5 (diff)
downloadtraccar-server-464348b91591a684bc16cf3c207f38ca3f923daa.tar.gz
traccar-server-464348b91591a684bc16cf3c207f38ca3f923daa.tar.bz2
traccar-server-464348b91591a684bc16cf3c207f38ca3f923daa.zip
Support MiniFinder command result
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/MiniFinderProtocolDecoder.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
index 9ea8de0bf..2b7a960c4 100644
--- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
+++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
@@ -143,7 +143,7 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder {
}
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress);
- if (deviceSession == null || !sentence.matches("![A-D],.*")) {
+ if (deviceSession == null || !sentence.matches("![3A-D],.*")) {
return null;
}
@@ -153,7 +153,15 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder {
String type = sentence.substring(1, 2);
position.set(Position.KEY_TYPE, type);
- if (type.equals("B") || type.equals("D")) {
+ if (type.equals("3")) {
+
+ getLastLocation(position, null);
+
+ position.set(Position.KEY_RESULT, sentence.substring(3));
+
+ return position;
+
+ } else if (type.equals("B") || type.equals("D")) {
Parser parser = new Parser(PATTERN_BD, sentence);
if (!parser.matches()) {