aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gt02ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-09-28 13:40:00 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-09-28 13:40:00 +1200
commit53494de4e41e1c4d4440c9afc0c4a9dfa6480558 (patch)
tree9dc441029fbcb5ea71b83c49ef89599012bcccc8 /src/org/traccar/protocol/Gt02ProtocolDecoder.java
parentc1b6fb0e25020b845b059aef0adebeac7d90ed7c (diff)
downloadtrackermap-server-53494de4e41e1c4d4440c9afc0c4a9dfa6480558.tar.gz
trackermap-server-53494de4e41e1c4d4440c9afc0c4a9dfa6480558.tar.bz2
trackermap-server-53494de4e41e1c4d4440c9afc0c4a9dfa6480558.zip
Remove optional fields
Diffstat (limited to 'src/org/traccar/protocol/Gt02ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gt02ProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt02ProtocolDecoder.java b/src/org/traccar/protocol/Gt02ProtocolDecoder.java
index 22402ce45..65c3260e7 100644
--- a/src/org/traccar/protocol/Gt02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt02ProtocolDecoder.java
@@ -24,6 +24,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 Gt02ProtocolDecoder extends BaseProtocolDecoder {
@@ -76,7 +77,8 @@ public class Gt02ProtocolDecoder extends BaseProtocolDecoder {
// Create new position
Position position = new Position();
- position.setId(index);
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("gt02");
+ extendedInfo.set("index", index);
// Get device id
try {
@@ -120,6 +122,7 @@ public class Gt02ProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(longitude);
position.setAltitude(0.0);
+ position.setExtendedInfo(extendedInfo.toString());
return position;
}