aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/XexunProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/XexunProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/XexunProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java
index 03d746c34..bc92e4fb6 100644
--- a/src/org/traccar/protocol/XexunProtocolDecoder.java
+++ b/src/org/traccar/protocol/XexunProtocolDecoder.java
@@ -25,6 +25,7 @@ import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.ServerManager;
import org.traccar.helper.Log;
+import org.traccar.model.ExtendedInfoFormatter;
import org.traccar.model.Position;
public class XexunProtocolDecoder extends BaseProtocolDecoder {
@@ -61,6 +62,7 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
// Create new position
Position position = new Position();
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("xexun");
Integer index = 1;
@@ -73,7 +75,7 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
time.set(Calendar.MILLISECOND, Integer.valueOf(parser.group(index++)));
// Validity
- position.setValid(parser.group(index++).compareTo("A") == 0 ? true : false);
+ position.setValid(parser.group(index++).compareTo("A") == 0);
// Latitude
Double latitude = Double.valueOf(parser.group(index++));
@@ -116,6 +118,7 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
return null;
}
+ position.setExtendedInfo(extendedInfo.toString());
return position;
}