From 464348b91591a684bc16cf3c207f38ca3f923daa Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 26 Oct 2018 07:19:42 +0400 Subject: Support MiniFinder command result --- src/org/traccar/protocol/MiniFinderProtocolDecoder.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/org') 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()) { -- cgit v1.2.3