diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-01-26 11:10:35 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-01-26 11:10:35 +1300 |
commit | ab2ea4acda1547c813ce6a2bfe6e5c63181e22c6 (patch) | |
tree | 498beeb47bdc2d03f28ffb3fe5a80004165e97d7 /src | |
parent | b5ba2f7b0a01176a3ecd6cbc4b46c62f00d353fb (diff) | |
download | trackermap-server-ab2ea4acda1547c813ce6a2bfe6e5c63181e22c6.tar.gz trackermap-server-ab2ea4acda1547c813ce6a2bfe6e5c63181e22c6.tar.bz2 trackermap-server-ab2ea4acda1547c813ce6a2bfe6e5c63181e22c6.zip |
Add GoPass protocol support
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/T55ProtocolDecoder.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java index 3c4a9500b..0cd7ca1b7 100644 --- a/src/org/traccar/protocol/T55ProtocolDecoder.java +++ b/src/org/traccar/protocol/T55ProtocolDecoder.java @@ -107,6 +107,15 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder { Log.warning("Unknown device - " + id); } } + + // Identification + else if (Character.isDigit(sentence.charAt(0)) & sentence.length() == 15) { + try { + deviceId = getDataManager().getDeviceByImei(sentence).getId(); + } catch(Exception error) { + Log.warning("Unknown device - " + sentence); + } + } // Location else if (sentence.startsWith("$GPRMC") && deviceId != null) { |