diff options
Diffstat (limited to 'src/org/traccar/protocol/MiniFinderProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/MiniFinderProtocolDecoder.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java index c37e44659..09e8dcafe 100644 --- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java +++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java @@ -16,7 +16,6 @@ package org.traccar.protocol; import java.util.Calendar; -import java.util.Properties; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -25,9 +24,6 @@ import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; import org.traccar.BaseProtocolDecoder; -import org.traccar.database.DataManager; -import org.traccar.helper.Log; -import org.traccar.model.ExtendedInfoFormatter; import org.traccar.model.Position; public class MiniFinderProtocolDecoder extends BaseProtocolDecoder { @@ -74,7 +70,7 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder { // Create new position Position position = new Position(); - ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter(getProtocol()); + position.setProtocol(getProtocol()); position.setDeviceId(getDeviceId()); Integer index = 1; @@ -98,19 +94,17 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder { // Flags String flags = parser.group(index++); - extendedInfo.set("flags", flags); + position.set("flags", flags); position.setValid((Integer.parseInt(flags, 16) & 0x01) != 0); // Altitude position.setAltitude(Double.valueOf(parser.group(index++))); // Battery - extendedInfo.set("battery", parser.group(index++)); + position.set("battery", parser.group(index++)); // Satellites - extendedInfo.set("satellites", parser.group(index++)); - - position.setExtendedInfo(extendedInfo.toString()); + position.set("satellites", parser.group(index++)); return position; } |