diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-11-06 22:18:28 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-11-06 22:18:28 +1300 |
commit | f9ecee5b732b0c82c8a95bebdb5e275ea479cccc (patch) | |
tree | 778b3a3a3af7abef4bce7260b61e0a729c510d9f /src/org/traccar/protocol/V680ProtocolDecoder.java | |
parent | e0a8940f73915dc560e68405ad70c45dcbd79899 (diff) | |
download | trackermap-server-f9ecee5b732b0c82c8a95bebdb5e275ea479cccc.tar.gz trackermap-server-f9ecee5b732b0c82c8a95bebdb5e275ea479cccc.tar.bz2 trackermap-server-f9ecee5b732b0c82c8a95bebdb5e275ea479cccc.zip |
Improve V680 decoder
Diffstat (limited to 'src/org/traccar/protocol/V680ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/V680ProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/V680ProtocolDecoder.java b/src/org/traccar/protocol/V680ProtocolDecoder.java index ab7c4bff1..0f5d4b942 100644 --- a/src/org/traccar/protocol/V680ProtocolDecoder.java +++ b/src/org/traccar/protocol/V680ProtocolDecoder.java @@ -35,7 +35,7 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder { super(serverManager); } - static private Pattern pattern = Pattern.compile( + private static final Pattern pattern = Pattern.compile( "(?:#(\\d+)#" + // IMEI "([^#]*)#)?" + // User "(\\d+)#" + // Fix @@ -46,7 +46,7 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder { "(?:[^#]+#)?" + "(\\d+)(\\d{2}\\.\\d+)," + // Longitude (DDDMM.MMMM) "([EW])," + - "(\\d{2})(\\d{2}\\.\\d+)," + // Latitude (DDMM.MMMM) + "(\\d+)(\\d{2}\\.\\d+)," + // Latitude (DDMM.MMMM) "([NS])," + "(\\d+\\.\\d+)," + // Speed "(\\d+\\.?\\d*)?#" + // Course @@ -101,7 +101,7 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder { extendedInfo.set("user", parser.group(index++)); // Validity - position.setValid(Integer.valueOf(parser.group(index++)) > 0 ? true : false); + position.setValid(Integer.valueOf(parser.group(index++)) > 0); // Password extendedInfo.set("password", parser.group(index++)); |