aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-20 14:48:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-20 14:48:58 +1300
commit57d9d42a8a6e84a7af2c75a17c3df55850c52288 (patch)
tree861ef2b1af95de1a80dbd609dd91aa7548f77291 /src/org/traccar/BaseProtocolDecoder.java
parent9debdb83c7a00633b6ae751affea787afbd09729 (diff)
downloadtrackermap-server-57d9d42a8a6e84a7af2c75a17c3df55850c52288.tar.gz
trackermap-server-57d9d42a8a6e84a7af2c75a17c3df55850c52288.tar.bz2
trackermap-server-57d9d42a8a6e84a7af2c75a17c3df55850c52288.zip
Decode GT06 LBS data and status
Diffstat (limited to 'src/org/traccar/BaseProtocolDecoder.java')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index 12762c19b..e9c678930 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -74,7 +74,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
this.protocol = protocol;
}
- public void getLastLocation(Position position) {
+ public void getLastLocation(Position position, Date deviceTime) {
Position last = Context.getConnectionManager().getLastPosition(getDeviceId());
if (last != null) {
position.setFixTime(last.getFixTime());
@@ -87,6 +87,12 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
} else {
position.setFixTime(new Date(0));
}
+
+ if (deviceTime != null) {
+ position.setDeviceTime(deviceTime);
+ } else {
+ position.setDeviceTime(new Date());
+ }
}
}