diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-03-02 22:51:17 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-03-02 22:51:17 +1300 |
commit | 808e1134878630796bb9e35e0f5501be942f4c5b (patch) | |
tree | e85886fa98c4466eb28c87fd2a7961f35d4dad5c /src/org/traccar/protocol/Xexun2ProtocolDecoder.java | |
parent | e9d0dd5df65eea669d34750ed9a4b505d68f6dc5 (diff) | |
download | trackermap-server-808e1134878630796bb9e35e0f5501be942f4c5b.tar.gz trackermap-server-808e1134878630796bb9e35e0f5501be942f4c5b.tar.bz2 trackermap-server-808e1134878630796bb9e35e0f5501be942f4c5b.zip |
Fix negative altitude
Diffstat (limited to 'src/org/traccar/protocol/Xexun2ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Xexun2ProtocolDecoder.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/org/traccar/protocol/Xexun2ProtocolDecoder.java b/src/org/traccar/protocol/Xexun2ProtocolDecoder.java index 2e84ef47f..6981c8d42 100644 --- a/src/org/traccar/protocol/Xexun2ProtocolDecoder.java +++ b/src/org/traccar/protocol/Xexun2ProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2012 - 2013 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,14 +26,8 @@ import org.traccar.ServerManager; import org.traccar.helper.Log; import org.traccar.model.Position; -/** - * Xexun tracker protocol decoder - */ public class Xexun2ProtocolDecoder extends BaseProtocolDecoder { - /** - * Initialize - */ public Xexun2ProtocolDecoder(ServerManager serverManager) { super(serverManager); } @@ -61,14 +55,12 @@ public class Xexun2ProtocolDecoder extends BaseProtocolDecoder { ".*imei:" + "(\\d+)," + // IMEI "(\\d+)," + // Satellites - "(\\d+\\.\\d+)," + // Altitude + "(-?\\d+\\.\\d+)," + // Altitude "[FL]:(\\d+\\.\\d+)V," + // Power ".*" + "[\r\n]*"); - /** - * Decode message - */ + @Override protected Object decode( ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception { @@ -77,7 +69,6 @@ public class Xexun2ProtocolDecoder extends BaseProtocolDecoder { String sentence = (String) msg; Matcher parser = pattern.matcher(sentence); if (!parser.matches()) { - //throw new ParseException(null, 0); return null; } |